Sort account list by name [skip ci]

This commit is contained in:
James Cole 2016-12-14 18:44:56 +01:00
parent 69c5c93353
commit b2743825ca

View File

@ -47,6 +47,12 @@ class AccountList implements BinderInterface
->where('user_id', auth()->user()->id)
->get(['accounts.*']);
if ($object->count() > 0) {
$object = $object->sortBy(
function (Account $account) {
return $account->name;
}
);
return $object;
}
}