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()
    {
        $this->authorize('haveaccess','user.index');
        $users =  User::with('roles')->orderBy('id','Desc')->paginate(10);
        return $users;
        return view('user.index',compact('users'));
    }
public function index ( ) { $ this -> authorize ( 'haveaccess' , 'user.index' ) ; $ users = User :: with ( 'roles' ) -> orderBy ( 'id' , 'Desc' ) -> paginate ( 10 ) ; return view ( 'user.index' , compact ( 'users' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// //return $users;