role_id === 1 || $user->role_id === 2 || $user->role_id === 3 ) { return true; } } /** * Determine whether the user can clone the model. */ public function clone(User $user) { // Ensure the user has permission to clone games into the database. if ( $user->role_id === 1 || $user->role_id === 2 || $user->role_id === 3 ) { return true; } } /** * Determine whether the user can update the model. * * @param \App\Models\User $user * @return \Illuminate\Auth\Access\Response|bool */ public function update(User $user) { // Ensure the user has permission to updates games in the database. if ( $user->role_id === 1 || $user->role_id === 2 || $user->role_id === 3 ) { return true; } } /** * Determine whether the user can delete the model. * * @param \App\Models\User $user * @param \App\Models\Game $game * @return \Illuminate\Auth\Access\Response|bool */ public function delete(User $user, Game $game) { // Ensure the user has permission to delete games from the database. if ( $user->role_id === 1 || $user->role_id === 2 || $user->role_id === 3 ) { return true; } } /** * Determine whether the user can restore the model. * * @param \App\Models\User $user * @param \App\Models\Game $game * @return \Illuminate\Auth\Access\Response|bool */ public function restore(User $user, Game $game) { // } /** * Determine whether the user can permanently delete the model. * * @param \App\Models\User $user * @param \App\Models\Game $game * @return \Illuminate\Auth\Access\Response|bool */ public function forceDelete(User $user, Game $game) { // } }