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()
    {
        $users = User::where('role_id',2)->with("role")->get();
        return view("/admin/index")->with("users",$users);
    }
public function index ( ) { $ users = User :: where ( 'role_id' , 2 ) -> with ( " role " ) -> get ( ) ; return view ( " /admin/index " ) -> with ( " users " , $ users ) ; }
Display a listing of the resource.
Display a listing of the resource .