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 |
||
74 | */ |
||
75 | public function show($id) |
||
79 | |||
80 | /** |
||
81 | * Bulk control the given resources. |
||
82 | * |
||
83 | * @return \Illuminate\Http\Response |
||
84 | */ |
||
85 | public function bulk() |
||
89 | |||
90 | /** |
||
91 | * Show the form for creating a new resource. |
||
92 | * |
||
93 | * @return \Illuminate\Http\Response |
||
94 | */ |
||
95 | public function create() |
||
99 | |||
100 | /** |
||
101 | * Store a newly created resource in storage. |
||
102 | * |
||
103 | * @param \Illuminate\Http\Request $request |
||
104 | * |
||
105 | * @return \Illuminate\Http\Response |
||
106 | */ |
||
107 | public function store(Request $request) |
||
111 | |||
112 | /** |
||
113 | * Show the form for copying the given resource. |
||
114 | * |
||
115 | * @param int $id |
||
116 | * |
||
117 | * @return \Illuminate\Http\Response |
||
118 | */ |
||
119 | public function copy($id) |
||
123 | |||
124 | /** |
||
125 | * Show the form for editing the given resource. |
||
126 | * |
||
127 | * @param int $id |
||
128 | * |
||
129 | * @return \Illuminate\Http\Response |
||
130 | */ |
||
131 | public function edit($id) |
||
135 | |||
136 | /** |
||
137 | * Update the given resource in storage. |
||
138 | * |
||
139 | * @param \Illuminate\Http\Request $request |
||
140 | * @param int $id |
||
141 | * |
||
142 | * @return \Illuminate\Http\Response |
||
143 | */ |
||
144 | public function update(Request $request, $id) |
||
148 | |||
149 | /** |
||
150 | * Delete the given resource from storage. |
||
151 | * |
||
152 | * @param int $id |
||
153 | * |
||
154 | * @return \Illuminate\Http\Response |
||
155 | */ |
||
156 | public function delete($id) |
||
160 | |||
161 | /** |
||
162 | * Import the given resources into storage. |
||
163 | * |
||
164 | * @return \Illuminate\Http\Response |
||
165 | */ |
||
166 | public function import() |
||
170 | |||
171 | /** |
||
172 | * Export the given resources from storage. |
||
173 | * |
||
174 | * @return \Illuminate\Http\Response |
||
175 | */ |
||
176 | public function export() |
||
180 | } |
||
181 |
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.