/**
  * Bind data to the view
  *
  * @param View $view
  * @return void
  */
 public function compose(View $view)
 {
     $view->with('count', ['users' => $this->users->count(), 'tasks' => $this->tasks->count()]);
 }
Esempio n. 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $users = $this->user->paginate();
     $totalUsers = $this->user->count();
     return view('admin.users.index', compact('users', 'totalUsers'));
 }