Skip to content
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

Driver [fcm] not supported #19

Open
greatsami opened this issue May 16, 2018 · 13 comments
Open

Driver [fcm] not supported #19

greatsami opened this issue May 16, 2018 · 13 comments

Comments

@greatsami
Copy link

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

@benwilkins
Copy link
Owner

Did you register the provider?

@greatsami
Copy link
Author

Yes, sure.

@junaid-A-khan
Copy link

@greatsami what Laravel version you are on? did u try clearing out cache and if you are using queues/supervisor then try restarting them

@p3ym4n
Copy link

p3ym4n commented Oct 12, 2018

clean your bootstrap cache folder.

@jaspervanbrian
Copy link

Also for me. Driver [fcm] not supported

@acip
Copy link

acip commented Aug 1, 2019

We had the same issue on PHP 7.1.26. It might be a Laravel related issue, though.

@vimalmistry
Copy link

Same Issue. Any Update??

@Dennis-Mwea
Copy link

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];
    }

@rajuprasad21
Copy link

.ERROR: Driver [Benwilkins\FCM\FcmChannel] not supported
I am getting this error. laravel version 6.2

@MichaelMagomedov
Copy link

+1

@quang4dev
Copy link

Same for me, solved it by adding the class FCMServiceProvider to config/app.php
like this:

'providers' => [
    ...
    /**
     * FCM Notifications
     */
    FCMServiceProvider::class,
    ...
]

@RizwanBlogger
Copy link

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

@danillo10
Copy link

config/app.php providers = [..., NotificationChannels\Fcm\FcmServiceProvider::class] after public function via($notifiable)
{
return [FcmChannel::class];
} use NotificationChannels\Fcm\FcmMessage; solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests