fix: paginate user search results
This commit is contained in:
parent
0e85f81fe6
commit
ec23c05c5f
@ -66,7 +66,7 @@ class UserController extends Controller
|
|||||||
$matchingUsers = User::query()
|
$matchingUsers = User::query()
|
||||||
->where('name', 'LIKE', "%{$searchTerm}%")
|
->where('name', 'LIKE', "%{$searchTerm}%")
|
||||||
->orWhere('email', 'LIKE', "%{$searchTerm}%")
|
->orWhere('email', 'LIKE', "%{$searchTerm}%")
|
||||||
->get();
|
->paginate(6);
|
||||||
|
|
||||||
if (! $matchingUsers->isEmpty()) {
|
if (! $matchingUsers->isEmpty()) {
|
||||||
$request->session()->flash('success', __('There were :usersCount user(s) matching your search.', ['usersCount' => $matchingUsers->count()]));
|
$request->session()->flash('success', __('There were :usersCount user(s) matching your search.', ['usersCount' => $matchingUsers->count()]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user