我尝试在laravel 5.8项目上配置NEXMO,但出现错误,这是错误消息:
“请提供Nexmo API凭据。可能的组合:api_key + api_secret,api_key + signature_secret,private_key + application_id,api_key + api_secret + private_key + application_id, api_key +签名机密+私钥+ application_id”
我用来安装composer require nexmo / laravel和composer require nexmo / client
我的文件是: services.php
'nexmo' => [
'key' => env('MY_API'),
'secret' => env('MY_SECRET'),
'sms_from' => env('MY_PHONE'),
],
nexmo.php
'api_key' => function_exists('env') ? env('MY_API', '') : '',
'api_secret' => function_exists('env') ? env('MY_sECRET', '') : '',
.env
NEXMO_KEY=MY_API
NEXMO_SECRET=MY_SECRET
请提供正确的配置方法,MY_API和MY_PHONE仅用于显示问题,在这里我输入了正确的信息