public function index($trashed = false)
    {
        $this->authorize(UsersPolicy::PERMISSION_LIST);

        $users = $this->user->with('roles')->protectAdmins()->when($trashed, function ($query) {
            return $query->onlyTrashed();
        })->paginate(30);

        $title = trans('auth::users.titles.users-list').($trashed ? ' - '.trans('core::generals.trashed') : '');
        $this->setTitle($title);
        $this->addBreadcrumb($title);

        return $this->view('admin.users.index', compact('trashed', 'users'));
    }
public function index($trashed = false)
    {
        $this->authorize(UsersPolicy::PERMISSION_LIST);

        $users = $this->user->with('roles')->protectAdmins()->when($trashed, function ($query) {
            return $query->onlyTrashed();
        })->paginate(30);

        $title = trans('auth::users.titles.users-list').($trashed ? ' - '.trans('core::generals.trashed') : '');
        $this->setTitle($title);
        $this->addBreadcrumb($title);

        return $this->view('admin.users.index', compact('trashed', 'users'));
    }
public function index ( $ trashed = false ) { $ this -> authorize ( UsersPolicy :: PERMISSION_LIST ) ; $ users = $ this -> user -> with ( 'roles' ) -> protectAdmins ( ) -> when ( $ trashed , function ( $ query ) { return $ query -> onlyTrashed ( ) ; } ) -> paginate ( 30 ) ; $ title = trans ( 'auth::users.titles.users-list' ) . ( $ trashed ? ' - ' . trans ( 'core::generals.trashed' ) : '' ) ; $ this -> setTitle ( $ title ) ; $ this -> addBreadcrumb ( $ title ) ; return $ this -> view ( 'admin.users.index' , compact ( 'trashed' , 'users' ) ) ; }
List the users.

@param  bool  $trashed

@return \Illuminate\View\View
List the users .