app/Http/Controllers/UsersController.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()
    {
        if(auth()->user()->isAdmin()){
            $users = User::all();
            return view('pages.admin.users.index')->with('users', $users);
        }
        else abort(404);
    }
public function index ( ) { if ( auth ( ) -> user ( ) -> isAdmin ( ) ) { $ users = User :: all ( ) ; return view ( 'pages.admin.users.index' ) -> with ( 'users' , $ users ) ; } else abort ( 404 ) ; }
Display a listing of the resource.
Display a listing of the resource .