Ejemplo n.º 1
0
 /**
  * userList.
  *
  * TODO: set pagination to the view.
  *
  * Get the user list of the system.
  */
 public function userList()
 {
     if (!Auth::user()->is('admin') || Auth::user()->is('developer')) {
         return Redirect::route('trips.index', ['selector' => 'all']);
     }
     $data['title'] = trans('sfa.titleUserControl');
     $data['users'] = User::paginate(15);
     // User count.
     $data['all'] = count(User::all());
     $data['active'] = count(User::where('status', 0)->get());
     $data['blocked'] = count(User::where('status', 1)->get());
     return view('backend.userControl', $data);
 }