-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toPushNotification not trigger #82
Comments
use it as below, as in laravel 10 and 11 it is not triggering as in docs.
|
it does not work for me either and we need it in our company. We are using laravel 11,livewire3 , pusher beams. Spyridon
|
Well my problem was that the documentation is misleading. It says the default convention is If in doubt just |
I'm trying to use pusher-push-notifications in Laravel 11, with a Vue 3 SPA, in a separate project. If I try to make the call with a Curl or an Http request, the notification is successful. The problem arises when I try to use the pusher-push-notifications functionalities.
`
$user = \App\Models\User::find(136);
$notifica = 'notifica';
try {
// $user->notify( new TestNotification($notifica));
\Illuminate\Support\Facades\Notification::send(User::all(), new TestNotification($notifica));
notifica = $notifica; } /** * Get the notification's delivery channels. * * @return array */ public function via(object $notifiable): array { return [PusherChannel::class ]; } public function toPushNotification($notifiable) { return PusherMessage::create() ->web() ->link(env('SPA_URL')) ->title('Titolo notifica') ->sound('success') ->body("Your {$notifiable->service} account was approved!"); } } ` Basically, the notification's via() method doesn't lead me to the next toPushNotification and therefore doesn't send the notification. Does anyone have any solutions?The text was updated successfully, but these errors were encountered: