Total Complexity | 2 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class LaravelRolesApiController extends Controller |
||
11 | { |
||
12 | use RolesAndPermissionsHelpersTrait; |
||
|
|||
13 | // use RolesUsageAuthTrait; |
||
14 | |||
15 | /** |
||
16 | * Return all the roles, Permissions, and Users data. |
||
17 | * |
||
18 | * @return \Illuminate\Http\Response |
||
19 | */ |
||
20 | public function index() |
||
21 | { |
||
22 | $data = $this->getDashboardData(); |
||
23 | |||
24 | return response()->json([ |
||
25 | 'code' => 200, |
||
26 | 'status' => 'success', |
||
27 | 'message' => 'Success returning all roles and permissions data.', |
||
28 | 'data' => $data['data'], |
||
29 | ], 200); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Show the form for creating a new resource. |
||
34 | * |
||
35 | * @return \Illuminate\Http\Response |
||
36 | */ |
||
37 | public function store(StoreRoleRequest $request) |
||
49 | } |
||
50 | } |
||
51 |