Guard against attempting to send notification to model that isn't notifiable
This commit is contained in:
parent
f6a11ac0ed
commit
11208ee064
1 changed files with 4 additions and 2 deletions
|
@ -142,9 +142,11 @@ class CheckoutableListener
|
||||||
$notifiables = collect();
|
$notifiables = collect();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify the user who checked out the item
|
* Notify who checked out the item as long as the model can route notifications
|
||||||
*/
|
*/
|
||||||
$notifiables->push($event->checkedOutTo);
|
if (method_exists($event->checkedOutTo, 'routeNotificationFor')) {
|
||||||
|
$notifiables->push($event->checkedOutTo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify Admin users if the settings is activated
|
* Notify Admin users if the settings is activated
|
||||||
|
|
Loading…
Add table
Reference in a new issue