Hi, I'm trying to paginate notifications in a livewire volt component like this:
$this->notifications = auth()->user()->notifications()->paginate(5);
I get the error message:
Property type not supported in Livewire for property: [{"current_page":1,"data":[{"id":"70572501-fa2a-4f0b-bfd5-8ae54a2f3014","type":"info","notifiable_type":"App\\Models\\User","notifiable_id":219,"data":{"user_id":219,"user_name":"demo","user_email":"[email protected]","notification_title":"Password reset","notification_description":"A request has been made to reset your password."},"read_at":null,"created_at":"2024-11-29T16:16:14.000000Z","updated_at":"2024-11-29T16:16:14.000000Z"}]
It seems that the Illuminate\Notifications\DatabaseNotificationCollection cannot be paginated?
(Method Illuminate\Notifications\DatabaseNotificationCollection::links does not exist)
But I don't know how to put it into a form that can be paginated?
Unfortunately, I can't find anything suitable on Google...
Has anyone had any experience with this?