/** * @Get("/") */ public function getIndex() { $users = User::all(); $roles = Role::all(); return view('super-admin.users.index', compact('users', 'roles')); }
/** * @Middleware("user") * @Get("/") */ public function getRoles() { $roles = Role::all(); return \Response::json($roles, 200); }