app/Http/Controllers/UserController.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()
    {
        $usuarios=User::with("roles")->orderBy('name')->paginate(10);
        $roles=Role::orderBy('name')->get();
        return view('panel.usuarios.index', compact('usuarios','roles'));
    }
public function index ( ) { $ usuarios = User :: with ( " roles " ) -> orderBy ( 'name' ) -> paginate ( 10 ) ; $ roles = Role :: orderBy ( 'name' ) -> get ( ) ; return view ( 'panel.usuarios.index' , compact ( 'usuarios' , 'roles' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .