Matches almost done still refining
This commit is contained in:
@@ -86,7 +86,6 @@ class GamePolicy
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*/
|
||||
@@ -96,17 +95,16 @@ class GamePolicy
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
$game->status !== "Playing" ||
|
||||
($game->player1_user_id !== $user->id &&
|
||||
$game->player2_user_id !== $user->id)
|
||||
) {
|
||||
if (!in_array($game->status, ['Playing', 'Pending'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($game->player1_user_id !== $user->id && $game->player2_user_id !== $user->id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user