1 | <?php |
||
24 | class RolesController extends AuthorizedController |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | protected $resourceAbilityMap = [ |
||
30 | 'assign' => 'assign', |
||
31 | 'remove' => 'remove', |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * The role repository instance. |
||
36 | * |
||
37 | * @var \Rinvex\Fort\Contracts\RoleRepositoryContract |
||
38 | */ |
||
39 | protected $roleRepository; |
||
40 | |||
41 | /** |
||
42 | * Create a new users controller instance. |
||
43 | * |
||
44 | * @param \Rinvex\Fort\Contracts\RoleRepositoryContract $roleRepository |
||
45 | * |
||
46 | * @return void |
||
|
|||
47 | */ |
||
48 | public function __construct(RoleRepositoryContract $roleRepository) |
||
56 | |||
57 | /** |
||
58 | * Display a listing of the resource. |
||
59 | * |
||
60 | * @return \Illuminate\Http\Response |
||
61 | */ |
||
62 | public function index() |
||
66 | |||
67 | /** |
||
68 | * Display the specified resource. |
||
69 | * |
||
70 | * @param int $id |
||
71 | * |
||
72 | * @return \Illuminate\Http\Response |
||
73 | */ |
||
74 | public function show($id) |
||
78 | |||
79 | /** |
||
80 | * Bulk control the given resources. |
||
81 | * |
||
82 | * @return \Illuminate\Http\Response |
||
83 | */ |
||
84 | public function bulk() |
||
88 | |||
89 | /** |
||
90 | * Show the form for creating a new resource. |
||
91 | * |
||
92 | * @return \Illuminate\Http\Response |
||
93 | */ |
||
94 | public function create() |
||
98 | |||
99 | /** |
||
100 | * Store a newly created resource in storage. |
||
101 | * |
||
102 | * @param \Illuminate\Http\Request $request |
||
103 | * |
||
104 | * @return \Illuminate\Http\Response |
||
105 | */ |
||
106 | public function store(Request $request) |
||
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 | * Update the given resource in storage. |
||
137 | * |
||
138 | * @param \Illuminate\Http\Request $request |
||
139 | * @param int $id |
||
140 | * |
||
141 | * @return \Illuminate\Http\Response |
||
142 | */ |
||
143 | public function update(Request $request, $id) |
||
147 | |||
148 | /** |
||
149 | * Delete the given resource from storage. |
||
150 | * |
||
151 | * @param int $id |
||
152 | * |
||
153 | * @return \Illuminate\Http\Response |
||
154 | */ |
||
155 | public function destroy($id) |
||
159 | |||
160 | /** |
||
161 | * Import the given resources into storage. |
||
162 | * |
||
163 | * @return \Illuminate\Http\Response |
||
164 | */ |
||
165 | public function import() |
||
169 | |||
170 | /** |
||
171 | * Export the given resources from storage. |
||
172 | * |
||
173 | * @return \Illuminate\Http\Response |
||
174 | */ |
||
175 | public function export() |
||
179 | } |
||
180 |
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.