I'd like to get the total number of users on a page where all the users are listed. This page should be paginated.
So far, this is what I've come up with:
Controller
$users = User::paginate(10);
return View::make('index', compact('users'));
View:
{{{ count($users) }}}
But this gives me only the count of the users for the current page. I'd like to count the full result set, if possible without querying another time the database.