Пример #1
0
 /**
  * List the users.
  *
  * @param  bool  $trashed
  *
  * @return \Illuminate\View\View
  */
 public function index($trashed = false)
 {
     $this->authorize(UsersPolicy::PERMISSION_LIST);
     $users = $this->user->with('roles');
     $users = $trashed ? $users->onlyTrashed()->paginate(30) : $users->paginate(30);
     $title = 'List of users' . ($trashed ? ' - Trashed' : '');
     $this->setTitle($title);
     $this->addBreadcrumb($title);
     return $this->view('foundation.users.list', compact('trashed', 'users'));
 }