【问题标题】:Driver [nexmo] not supported Laravel 6驱动程序 [nexmo] 不支持 Laravel 6
【发布时间】:2019-11-28 12:13:36
【问题描述】:

我正在使用 Laravel 的 Nexmo 通知库,但自从我升级到 Laravel 6 后,它突然停止工作。

这是错误:

(1/1) InvalidArgumentException 不支持驱动程序 [nexmo]。

有什么想法吗?

我通过我的作曲家文件正确安装了库:

"nexmo/laravel": "^2.1.0",

似乎没有正确地自动加载库。

以下是我的config/app.php 文件:

'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,

    ],

【问题讨论】:

  • php artisan config:clear
  • @DilipHirapara 已经尝试过了。错误仍然显示
  • documentation on SMS Notifications: "在你可以通过 Nexmo 发送通知之前,你需要安装 laravel/nexmo-notification-channel Composer 包:" 你安装了那个包?还是你关注Upgrade Guide

标签: php laravel autoload laravel-6 nexmo


【解决方案1】:

获取通知驱动程序的包是 laravel/nexmo-notification-channel 而不是一般的 nexmo/laravel 包,它只是让您在 Laravel 应用程序中更轻松地使用 nexmo/client 库。

尝试安装laravel/nexmo-notification-channel 并告诉我们你的进展如何?

【讨论】:

  • 这是为我做的,谢谢!我不知道为什么 laravel/nexmo-notification-channel 还没有安装,自从我的 composer.json 升级后可能发生了一些变化。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-07-29
  • 2016-09-09
  • 2018-01-15
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多