Call to a member function isEmpty() null
Rakesh2907 opened this issue · 3 comments
Rakesh2907 commented
Hello,
When set Notification::send(User::all(),new PushDemo); in my controller getting following error
Call to a member function isEmpty() on null at D:\xampp\htdocs\XXXXXX\vendor\laravel-notification-channels\webpush\src\WebPushChannel.php:44)
Please help me.
jhenrich commented
Came across the same error. Adding the HasPushSubscriptions using on my user model fixed it for me
class User extends Authenticatable implements JWTSubject { use HasFactory, Notifiable, HasPushSubscriptions;
kirkbushell commented
I'm curious how to do this when your subscribers don't have user models. Ie. They've subscribed via the browser notice, but don't have a user account.
asterism612 commented
I have same error .
How to solve this problem?