diff --git a/app/Http/Livewire/Common/Notifications/Exports.php b/app/Http/Livewire/Common/Notifications/Exports.php index 8eae712c1..b137ab486 100644 --- a/app/Http/Livewire/Common/Notifications/Exports.php +++ b/app/Http/Livewire/Common/Notifications/Exports.php @@ -68,10 +68,10 @@ class Exports extends Component $notifications = $query->get(); } - if ($notifications->items()) { + if ($notifications) { $items = []; - foreach ($notifications->items() as $key => $notification) { + foreach ($notifications as $key => $notification) { $data = (object) $notification->getAttribute('data'); $data->notification_id = $notification->getAttribute('id'); diff --git a/app/Http/Livewire/Common/Notifications/Imports.php b/app/Http/Livewire/Common/Notifications/Imports.php index 69c947bbf..f30d9feba 100644 --- a/app/Http/Livewire/Common/Notifications/Imports.php +++ b/app/Http/Livewire/Common/Notifications/Imports.php @@ -68,10 +68,10 @@ class Imports extends Component $notifications = $query->get(); } - if ($notifications->items()) { + if ($notifications) { $items = []; - foreach ($notifications->items() as $key => $notification) { + foreach ($notifications as $key => $notification) { $data = (object) $notification->getAttribute('data'); $data->notification_id = $notification->getAttribute('id'); diff --git a/app/Http/Livewire/Common/Notifications/Recurring.php b/app/Http/Livewire/Common/Notifications/Recurring.php index 297c3c289..57ab64546 100644 --- a/app/Http/Livewire/Common/Notifications/Recurring.php +++ b/app/Http/Livewire/Common/Notifications/Recurring.php @@ -63,10 +63,10 @@ class Recurring extends Component $notifications = $query->get(); } - if ($notifications->items()) { + if ($notifications) { $items = []; - foreach ($notifications->items() as $key => $notification) { + foreach ($notifications as $key => $notification) { $data = (object) $notification->getAttribute('data'); $item = Document::{$this->type}()->where('id', $data[$this->type . '_id'])->first(); diff --git a/app/Http/Livewire/Common/Notifications/Reminder.php b/app/Http/Livewire/Common/Notifications/Reminder.php index 66c2f4f36..38405eee9 100644 --- a/app/Http/Livewire/Common/Notifications/Reminder.php +++ b/app/Http/Livewire/Common/Notifications/Reminder.php @@ -63,10 +63,10 @@ class Reminder extends Component $notifications = $query->get(); } - if ($notifications->items()) { + if ($notifications) { $items = []; - foreach ($notifications->items() as $key => $notification) { + foreach ($notifications as $key => $notification) { $data = (object) $notification->getAttribute('data'); $item = Document::{$this->type}()->where('id', $data[$this->type . '_id'])->first();