->count() > 0;
}
+ /**
+ * Determine whether the user can edit restreams from the episode.
+ *
+ * @param \App\Models\User $user
+ * @param \App\Models\Episode $episode
+ * @return \Illuminate\Auth\Access\Response|bool
+ */
+ public function editRestream(User $user, Episode $episode) {
+ return $user->channel_crews()
+ ->where('role', '=', 'admin')
+ ->whereIn('channel_id', $episode->channels->pluck('id'))
+ ->count() > 0;
+ }
+
/**
* Determine whether the user can remove restreams from the episode.
*