Fix subscribers page - use items() instead of through() for pagination
This commit is contained in:
parent
9ad058339a
commit
0187c2d822
1 changed files with 1 additions and 6 deletions
|
|
@ -19,12 +19,7 @@ class SubscriberController extends Controller
|
|||
->paginate(50);
|
||||
|
||||
return Inertia::render('Admin/Subscribers/Index', [
|
||||
'subscribers' => $subscribers->through(fn ($sub) => [
|
||||
'id' => $sub->id,
|
||||
'email' => $sub->email,
|
||||
'is_active' => $sub->is_active,
|
||||
'created_at' => $sub->created_at->format('Y-m-d H:i'),
|
||||
]),
|
||||
'subscribers' => $subscribers->items(),
|
||||
'pagination' => [
|
||||
'current_page' => $subscribers->currentPage(),
|
||||
'last_page' => $subscribers->lastPage(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue