1 | <?php |
||
23 | class RolesController extends AuthorizedController |
||
24 | { |
||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | protected $resource = 'roles'; |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | protected $resourceActionWhitelist = ['assign']; |
||
|
|||
34 | |||
35 | /** |
||
36 | * Display a listing of the resource. |
||
37 | * |
||
38 | * @return \Illuminate\Http\Response |
||
39 | */ |
||
40 | public function index() |
||
46 | |||
47 | /** |
||
48 | * Show the form for creating a new resource. |
||
49 | * |
||
50 | * @return \Illuminate\Http\Response |
||
51 | */ |
||
52 | public function create() |
||
56 | |||
57 | /** |
||
58 | * Show the form for editing the given resource. |
||
59 | * |
||
60 | * @param \Rinvex\Fort\Models\Role $role |
||
61 | * |
||
62 | * @return \Illuminate\Http\Response |
||
63 | */ |
||
64 | public function edit(Role $role) |
||
68 | |||
69 | /** |
||
70 | * Store a newly created resource in storage. |
||
71 | * |
||
72 | * @param \Illuminate\Http\Request $request |
||
73 | * |
||
74 | * @return \Illuminate\Http\Response |
||
75 | */ |
||
76 | public function store(Request $request) |
||
80 | |||
81 | /** |
||
82 | * Update the given resource in storage. |
||
83 | * |
||
84 | * @param \Illuminate\Http\Request $request |
||
85 | * @param \Rinvex\Fort\Models\Role $role |
||
86 | * |
||
87 | * @return \Illuminate\Http\Response |
||
88 | */ |
||
89 | public function update(Request $request, Role $role) |
||
93 | |||
94 | /** |
||
95 | * Delete the given resource from storage. |
||
96 | * |
||
97 | * @param \Rinvex\Fort\Models\Role $role |
||
98 | * |
||
99 | * @return \Illuminate\Http\Response |
||
100 | */ |
||
101 | public function delete(Role $role) |
||
110 | |||
111 | /** |
||
112 | * Show the form for create/update of the given resource. |
||
113 | * |
||
114 | * @param string $mode |
||
115 | * @param string $action |
||
116 | * @param \Rinvex\Fort\Models\Role $role |
||
117 | * |
||
118 | * @return \Illuminate\Http\Response |
||
119 | */ |
||
120 | protected function form($mode, $action, Role $role) |
||
128 | |||
129 | /** |
||
130 | * Process the form for store/update of the given resource. |
||
131 | * |
||
132 | * @param \Illuminate\Http\Request $request |
||
133 | * @param \Rinvex\Fort\Models\Role $role |
||
134 | * |
||
135 | * @return \Illuminate\Http\Response |
||
136 | */ |
||
137 | protected function process(Request $request, Role $role) |
||
155 | } |
||
156 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.