app/Http/Controllers/Admin/RoleController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $roles = Role::all();
        $permissions = Permission::all();
        $usersWithRoles = User::with('roles')->orderBy('last_name')->get();
        return view('admin.roles.index', [
            'roles'       => $roles,
            'permissions' => $permissions,
            'users'       => $usersWithRoles
        ]);
    }
public function index ( ) { $ roles = Role :: all ( ) ; $ permissions = Permission :: all ( ) ; $ usersWithRoles = User :: with ( 'roles' ) -> orderBy ( 'last_name' ) -> get ( ) ; return view ( 'admin.roles.index' , [ 'roles' => $ roles , 'permissions' => $ permissions , 'users' => $ usersWithRoles ] ) ; }
Display a listing of the resource.
Display a listing of the resource .