| 1 | <?php |
||
| 8 | class UserPolicy |
||
| 9 | { |
||
| 10 | use HandlesAuthorization; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Determine whether the user can view any models. |
||
| 14 | * |
||
| 15 | * @param \App\User $user |
||
| 16 | * @return mixed |
||
| 17 | */ |
||
| 18 | public function viewAny(User $user) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Determine whether the user can view the model. |
||
| 25 | * |
||
| 26 | * @param \App\User $user |
||
| 27 | * @param \App\User $model |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function view(User $user, User $model) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Determine whether the user can create models. |
||
| 37 | * |
||
| 38 | * @param \App\User $user |
||
| 39 | * @return mixed |
||
| 40 | */ |
||
| 41 | public function create(User $user) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Determine whether the user can update the model. |
||
| 48 | * |
||
| 49 | * @param \App\User $user |
||
| 50 | * @param \App\User $model |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function update(User $user, User $model) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Determine whether the user can delete the model. |
||
| 60 | * |
||
| 61 | * @param \App\User $user |
||
| 62 | * @param \App\User $model |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | public function delete(User $user, User $model) |
||
| 69 | } |
||
| 70 |