+ /**
+ * Determine whether the user can apply to participate.
+ *
+ * @param \App\Models\User $user
+ * @param \App\Models\Tournament $tournament
+ * @return \Illuminate\Auth\Access\Response|bool
+ */
+ public function apply(User $user, Tournament $tournament)
+ {
+ return $tournament->accept_applications && !$user->isRunner($tournament) && !$user->isApplicant($tournament);
+ }
+