I have a simple pagination from my model User:
$users = User::paginate(15);
Unfortunately, it returns the results ordered by id or something. I want to order the results ASC first and then paginate on them.
Can't find any way to get that working in combination with the paginate() method, like:
$users = User::orderBy('username', 'asc')->paginate(15);
Any idea?
Thanks