app/Http/Controllers/Backsite/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()
    {
        abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
        $user = User::orderBy('created_at', 'desc')->get();
        $type_user = TypeUser::orderBy('name', 'asc')->get();
        $roles = Role::all()->pluck('title', 'id');
        return view('pages.backsite.management-access.user.index', compact('user', 'roles', 'type_user'));
    }
public function index ( ) { abort_if ( Gate :: denies ( 'user_access' ) , Response :: HTTP_FORBIDDEN , '403 Forbidden' ) ; $ user = User :: orderBy ( 'created_at' , 'desc' ) -> get ( ) ; $ type_user = TypeUser :: orderBy ( 'name' , 'asc' ) -> get ( ) ; $ roles = Role :: all ( ) -> pluck ( 'title' , 'id' ) ; return view ( 'pages.backsite.management-access.user.index' , compact ( 'user' , 'roles' , 'type_user' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .