1 | <?php |
||
23 | class AbilitiesController extends AuthorizedController |
||
24 | { |
||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | protected $resourceAbilityMap = [ |
||
29 | 'give' => 'give', |
||
30 | 'revoke' => 'revoke', |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * The ability repository instance. |
||
35 | * |
||
36 | * @var \Rinvex\Fort\Contracts\AbilityRepositoryContract |
||
37 | */ |
||
38 | protected $abilityRepository; |
||
39 | |||
40 | /** |
||
41 | * Create a new abilities controller instance. |
||
42 | * |
||
43 | * @return void |
||
|
|||
44 | */ |
||
45 | public function __construct(AbilityRepositoryContract $abilityRepository) |
||
53 | |||
54 | /** |
||
55 | * Display a listing of the resource. |
||
56 | * |
||
57 | * @return \Illuminate\Http\Response |
||
58 | */ |
||
59 | public function index() |
||
63 | |||
64 | /** |
||
65 | * Display the specified resource. |
||
66 | * |
||
67 | * @param int $id |
||
68 | * |
||
69 | * @return \Illuminate\Http\Response |
||
70 | */ |
||
71 | public function show($id) |
||
75 | |||
76 | /** |
||
77 | * Bulk control the given resources. |
||
78 | * |
||
79 | * @return \Illuminate\Http\Response |
||
80 | */ |
||
81 | public function bulk() |
||
85 | |||
86 | /** |
||
87 | * Show the form for creating a new resource. |
||
88 | * |
||
89 | * @return \Illuminate\Http\Response |
||
90 | */ |
||
91 | public function create() |
||
95 | |||
96 | /** |
||
97 | * Store a newly created resource in storage. |
||
98 | * |
||
99 | * @param \Illuminate\Http\Request $request |
||
100 | * |
||
101 | * @return \Illuminate\Http\Response |
||
102 | */ |
||
103 | public function store(Request $request) |
||
107 | |||
108 | /** |
||
109 | * Show the form for copying the given resource. |
||
110 | * |
||
111 | * @param int $id |
||
112 | * |
||
113 | * @return \Illuminate\Http\Response |
||
114 | */ |
||
115 | public function copy($id) |
||
119 | |||
120 | /** |
||
121 | * Show the form for editing the given resource. |
||
122 | * |
||
123 | * @param int $id |
||
124 | * |
||
125 | * @return \Illuminate\Http\Response |
||
126 | */ |
||
127 | public function edit($id) |
||
131 | |||
132 | /** |
||
133 | * Update the given resource in storage. |
||
134 | * |
||
135 | * @param \Illuminate\Http\Request $request |
||
136 | * @param int $id |
||
137 | * |
||
138 | * @return \Illuminate\Http\Response |
||
139 | */ |
||
140 | public function update(Request $request, $id) |
||
144 | |||
145 | /** |
||
146 | * Delete the given resource from storage. |
||
147 | * |
||
148 | * @param int $id |
||
149 | * |
||
150 | * @return \Illuminate\Http\Response |
||
151 | */ |
||
152 | public function destroy($id) |
||
156 | |||
157 | /** |
||
158 | * Import the given resources into storage. |
||
159 | * |
||
160 | * @return \Illuminate\Http\Response |
||
161 | */ |
||
162 | public function import() |
||
166 | |||
167 | /** |
||
168 | * Export the given resources from storage. |
||
169 | * |
||
170 | * @return \Illuminate\Http\Response |
||
171 | */ |
||
172 | public function export() |
||
176 | } |
||
177 |
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.