1 | <?php namespace Arcanesoft\Blog\Policies; |
||
11 | class CategoriesPolicy |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Getters and Setters |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * Get the policies. |
||
19 | * |
||
20 | * @return array |
||
21 | */ |
||
22 | 8 | public static function getPolicies() |
|
32 | |||
33 | /* ------------------------------------------------------------------------------------------------ |
||
34 | | Policies Functions |
||
35 | | ------------------------------------------------------------------------------------------------ |
||
36 | */ |
||
37 | /** |
||
38 | * Allow to list all the categories. |
||
39 | * |
||
40 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function listPolicy(User $user) |
||
48 | |||
49 | /** |
||
50 | * Allow to show a category details. |
||
51 | * |
||
52 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
53 | * |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function showPolicy(User $user) |
||
60 | |||
61 | /** |
||
62 | * Allow to create a category. |
||
63 | * |
||
64 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function createPolicy(User $user) |
||
72 | |||
73 | /** |
||
74 | * Allow to update a category. |
||
75 | * |
||
76 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
77 | * |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function updatePolicy(User $user) |
||
84 | |||
85 | /** |
||
86 | * Allow to delete a category. |
||
87 | * |
||
88 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
89 | * |
||
90 | * @return bool |
||
91 | */ |
||
92 | public function deletePolicy(User $user) |
||
96 | } |
||
97 |