laravel-fcm-notification
laravel-fcm-notification copied to clipboard
Driver [fcm] not supported
Hi,
I installed the package in my project and i paste routeNotificationForFcm() in User model:
/**
* Route notifications for the FCM channel.
*
* @return string
*/
public function routeNotificationForFcm()
{
return $this->device_token;
}
Is it right?
but when i try to send Notification i get this error
Driver [fcm] not supported. {"exception":"[object] (InvalidArgumentException(code: 0): Driver [fcm] not supported. at /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Manager.php:97)
how i can solve this error?
Thanks
Did you register the provider?
Yes, sure.
@greatsami what Laravel version you are on? did u try clearing out cache and if you are using queues/supervisor then try restarting them
clean your bootstrap cache folder.
Also for me. Driver [fcm] not supported
We had the same issue on PHP 7.1.26. It might be a Laravel related issue, though.
Same Issue. Any Update??
That's correct, there's no such driver as fcm. You need to pass the correct driver in your via method in notification class.
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return [FcmChannel::class];
}
.ERROR: Driver [Benwilkins\FCM\FcmChannel] not supported I am getting this error. laravel version 6.2
+1
Same for me, solved it by adding the class FCMServiceProvider to config/app.php like this:
'providers' => [
...
/**
* FCM Notifications
*/
FCMServiceProvider::class,
...
]
We had the same issue on PHP 8.0. It might be a Laravel related issue, though. and Laravel version ^8.75. please help this solution solve
config/app.php providers = [..., NotificationChannels\Fcm\FcmServiceProvider::class] after public function via($notifiable) { return [FcmChannel::class]; } use NotificationChannels\Fcm\FcmMessage; solved