1 | <?php namespace Modules\User\Http\Controllers\Admin; |
||
7 | class RolesController extends BaseUserModuleController |
||
8 | { |
||
9 | /** |
||
10 | * @var RoleRepository |
||
11 | */ |
||
12 | private $role; |
||
13 | |||
14 | public function __construct(PermissionManager $permissions, RoleRepository $role) |
||
15 | { |
||
16 | parent::__construct(); |
||
17 | |||
18 | $this->permissions = $permissions; |
||
19 | $this->role = $role; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Display a listing of the resource. |
||
24 | * |
||
25 | * @return Response |
||
26 | */ |
||
27 | public function index() |
||
28 | { |
||
29 | $roles = $this->role->all(); |
||
30 | |||
31 | return view('user::admin.roles.index', compact('roles')); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Show the form for creating a new resource. |
||
36 | * |
||
37 | * @return Response |
||
38 | */ |
||
39 | public function create() |
||
43 | |||
44 | /** |
||
45 | * Store a newly created resource in storage. |
||
46 | * |
||
47 | * @param RolesRequest $request |
||
48 | * @return Response |
||
49 | */ |
||
50 | public function store(RolesRequest $request) |
||
60 | |||
61 | /** |
||
62 | * Show the form for editing the specified resource. |
||
63 | * |
||
64 | * @param int $id |
||
65 | * @return Response |
||
66 | */ |
||
67 | public function edit($id) |
||
77 | |||
78 | /** |
||
79 | * Update the specified resource in storage. |
||
80 | * |
||
81 | * @param int $id |
||
82 | * @param RolesRequest $request |
||
83 | * @return Response |
||
84 | */ |
||
85 | public function update($id, RolesRequest $request) |
||
95 | |||
96 | /** |
||
97 | * Remove the specified resource from storage. |
||
98 | * |
||
99 | * @param int $id |
||
100 | * @return Response |
||
101 | */ |
||
102 | public function destroy($id) |
||
110 | } |
||
111 |