episode_number) || $episode->episode_number == 0) { $ep_num_arr = explode('_', $episode->slug); $episode->episode_number = $ep_num_arr[0]; } if ($episode->isDirty()) { $episode->save(); } } } }