Search code examples
phplaravelautoloadlaravel-6vonage

Driver [nexmo] not supported Laravel 6


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


Solution

  • The package to get the notifications driver is laravel/nexmo-notification-channel rather than the general nexmo/laravel package which just enables easier use of the nexmo/client library in your Laravel apps.

    Try installing laravel/nexmo-notification-channel and let us know how you go?