1 | <?php |
||
23 | class RolesController extends AuthorizedController |
||
24 | { |
||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | protected $resourceAbilityMap = [ |
||
29 | 'assign' => 'assign', |
||
30 | 'remove' => 'remove', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * The role repository instance. |
||
35 | * |
||
36 | * @var \Rinvex\Fort\Contracts\RoleRepositoryContract |
||
37 | */ |
||
38 | protected $roleRepository; |
||
39 | |||
40 | /** |
||
41 | * Create a new users controller instance. |
||
42 | * |
||
43 | * @param \Rinvex\Fort\Contracts\RoleRepositoryContract $roleRepository |
||
44 | * |
||
45 | * @return void |
||
|
|||
46 | */ |
||
47 | public function __construct(RoleRepositoryContract $roleRepository) |
||
55 | |||
56 | /** |
||
57 | * Display a listing of the resource. |
||
58 | * |
||
59 | * @return \Illuminate\Http\Response |
||
60 | */ |
||
61 | public function index() |
||
67 | |||
68 | /** |
||
69 | * Display the specified resource. |
||
70 | * |
||
71 | * @param int $id |
||
72 | * |
||
73 | * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
74 | */ |
||
75 | public function show($id) |
||
90 | |||
91 | /** |
||
92 | * Bulk control the given resources. |
||
93 | * |
||
94 | * @return \Illuminate\Http\Response |
||
95 | */ |
||
96 | public function bulk() |
||
100 | |||
101 | /** |
||
102 | * Show the form for creating a new resource. |
||
103 | * |
||
104 | * @return \Illuminate\Http\Response |
||
105 | */ |
||
106 | public function create() |
||
110 | |||
111 | /** |
||
112 | * Show the form for copying the given resource. |
||
113 | * |
||
114 | * @param int $id |
||
115 | * |
||
116 | * @return \Illuminate\Http\Response |
||
117 | */ |
||
118 | public function copy($id) |
||
122 | |||
123 | /** |
||
124 | * Show the form for editing the given resource. |
||
125 | * |
||
126 | * @param int $id |
||
127 | * |
||
128 | * @return \Illuminate\Http\Response |
||
129 | */ |
||
130 | public function edit($id) |
||
134 | |||
135 | /** |
||
136 | * Show the form for create/edit/copy of the given resource. |
||
137 | * |
||
138 | * @param string $mode |
||
139 | * @param string $action |
||
140 | * @param int|null $id |
||
141 | * |
||
142 | * @return \Illuminate\Http\Response |
||
143 | */ |
||
144 | protected function form($mode, $action, $id = null) |
||
157 | |||
158 | /** |
||
159 | * Store a newly created resource in storage. |
||
160 | * |
||
161 | * @param \Illuminate\Http\Request $request |
||
162 | * |
||
163 | * @return \Illuminate\Http\Response |
||
164 | */ |
||
165 | public function store(Request $request) |
||
170 | |||
171 | /** |
||
172 | * Update the given resource in storage. |
||
173 | * |
||
174 | * @param \Illuminate\Http\Request $request |
||
175 | * @param int $id |
||
176 | * |
||
177 | * @return \Illuminate\Http\Response |
||
178 | */ |
||
179 | public function update(Request $request, $id) |
||
183 | |||
184 | /** |
||
185 | * Delete the given resource from storage. |
||
186 | * |
||
187 | * @param int $id |
||
188 | * |
||
189 | * @return \Illuminate\Http\Response |
||
190 | */ |
||
191 | public function delete($id) |
||
195 | |||
196 | /** |
||
197 | * Import the given resources into storage. |
||
198 | * |
||
199 | * @return \Illuminate\Http\Response |
||
200 | */ |
||
201 | public function import() |
||
205 | |||
206 | /** |
||
207 | * Export the given resources from storage. |
||
208 | * |
||
209 | * @return \Illuminate\Http\Response |
||
210 | */ |
||
211 | public function export() |
||
215 | } |
||
216 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.