Nexmo / nexmo-laravel

Add Vonage functionality such as SMS and voice calling to your Laravel app with this Laravel Service Provider.
MIT License
317 stars 79 forks source link

Driver [nexmo] not supported Laravel 6 #39

Closed shabaz-ejaz closed 4 years ago

shabaz-ejaz commented 4 years ago

I am using the Nexmo notifications library for Laravel and it's all of a sudden stopped working since I upgraded to Laravel 6.

Here is the error:

(1/1) InvalidArgumentException Driver [nexmo] not supported.

Any ideas why this is?

I have the library installed properly through my composer file:

"nexmo/laravel": "^2.1.0",

It seems to not be autoloading the library properly.

Below is my config/app.php file:

'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Notifications\NotificationServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,
        Collective\Html\HtmlServiceProvider::class,

        /*
         * Package Service Providers...

         */

        Yajra\Datatables\DatatablesServiceProvider::class,
        ConsoleTVs\Charts\ChartsServiceProvider::class,
        SimpleSoftwareIO\SMS\SMSServiceProvider::class,
        Spatie\GoogleCalendar\GoogleCalendarServiceProvider::class,
        Nexmo\Laravel\NexmoServiceProvider::class,
        Propaganistas\LaravelPhone\PhoneServiceProvider::class,
        Barryvdh\Debugbar\ServiceProvider::class,
        DrawMyAttention\XeroLaravel\Providers\XeroServiceProvider::class,
        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        App\Providers\DropboxServiceProvider::class,
        App\Providers\ExtendedXeroServiceProvider::class,

    ],

enter image description here

lornajane commented 4 years ago

The notifications channel package is laravel/nexmo-notification-channel and you can find more information about that here https://laravel.com/docs/6.x/notifications#sms-notifications. The nexmo/laravel package is for more general use of the Nexmo client in Laravel applications - but the notifications package is more specialist and provides the notifications driver.

I hope that helps, please let us know how you get on?

shabaz-ejaz commented 4 years ago

Perfect. I just needed to install laravel/nexmo-notification-channel. Thank you