File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public function getSubscriptionFromNotifiable(object $notifiable): ?Notification
73
73
->where ('notification_template_id ' , self ::getTemplate ()->id );
74
74
75
75
// If this notification is for a specific model, include it in the query
76
- if (property_exists ( $ this , ' customModel ' ) && $ this ->customModel ) {
76
+ if ($ this ->customModel ) {
77
77
$ query ->where ('notifiable_type ' , get_class ($ this ->customModel ))
78
78
->where ('notifiable_id ' , $ this ->customModel ->id );
79
79
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Eugenefvdm \NotificationSubscriptions \Tests \TestNotifications ;
4
4
5
+ use Eugenefvdm \NotificationSubscriptions \Enums \RepeatFrequency ;
5
6
use Eugenefvdm \NotificationSubscriptions \Notifications \BaseNotification ;
6
7
use Illuminate \Bus \Queueable ;
7
8
use Illuminate \Contracts \Queue \ShouldQueue ;
@@ -12,7 +13,7 @@ class CustomModelNotification extends BaseNotification
12
13
{
13
14
use Queueable;
14
15
15
- protected static ?string $ repeatFrequency = ' weekly ' ;
16
+ protected static ?RepeatFrequency $ repeatFrequency = RepeatFrequency::Weekly ;
16
17
17
18
public ?Model $ customModel ;
18
19
You can’t perform that action at this time.
0 commit comments