Get user records from Sentry in desc order

137 Views Asked by At

I want to get user records from Laravel Sentry package.

This code return user records from DB:

$customer = Sentry::findGroupByName('Users');
$customer = Sentry::findAllUsersInGroup($customer);
return View::make('admin.store.customer')->with('customer', $customer);

How to sort user records in descending order?

1

There are 1 best solutions below

0
Mimouni On

you can try :

Sentry::findAllUsersInGroup($customer)->count();

to get count, and after adding a loop for order them.