1 | <?php |
||
11 | class NewsPolicy |
||
12 | { |
||
13 | use HandlesAuthorization; |
||
14 | |||
15 | /** |
||
16 | * Determine whether the user can view any news. |
||
17 | * |
||
18 | * @param \App\Models\Ministry $user |
||
19 | * @return mixed |
||
20 | */ |
||
21 | public function viewAny(Ministry $user) |
||
25 | |||
26 | /** |
||
27 | * Determine whether the user can view the news. |
||
28 | * |
||
29 | * @param Ministry $user |
||
30 | * @param News $news |
||
31 | * @return mixed |
||
32 | */ |
||
33 | public function view(Ministry $user, News $news) |
||
37 | |||
38 | /** |
||
39 | * Determine whether the user can create news. |
||
40 | * |
||
41 | * @param Ministry $user |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public function create(Ministry $user) |
||
57 | |||
58 | /** |
||
59 | * Determine whether the user can update the news. |
||
60 | * |
||
61 | * @param \App\Models\Ministry $user |
||
62 | * @param News $news |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function update(Ministry $user, News $news) |
||
69 | |||
70 | /** |
||
71 | * Determine whether the user can delete the news. |
||
72 | * |
||
73 | * @param \App\Models\Ministry $user |
||
74 | * @param News $news |
||
75 | * @return mixed |
||
76 | */ |
||
77 | public static function delete(Ministry $user, News $news) |
||
81 | } |
||
82 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.