kutia-software-company/larafirebase

Driver [firebase] not supported

blitsoftwares opened this issue · 1 comments

Hi!

Error on send notifications for me

Laravel 8x

class SendNewStarNotification extends Notification implements ShouldQueue
{
    use Queueable;

    public function __construct()
    {
        //
    }

    public function via($notifiable)
    {
        return ['firebase'];
    }

    public function toFirebase($notifiable)
    {
        if ($notifiable->firebase_unique_token) {
            $deviceTokens = [$notifiable->firebase_unique_token];
            return (new FirebaseMessage)
                ->withTitle('Ola, ', $notifiable->name)
                ->withBody('Teste do maluko')
                ->asNotification($deviceTokens); // OR ->asMessage($deviceTokens);
        }
    }
}

On send, in horizon:

InvalidArgumentException: Driver [firebase] not supported. in /var/www/app/vendor/laravel/framework/src/Illuminate/Support/Manager.php:109

Resolved ... composer dump