We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用最新的laravel版本,使用本扩展,在执行php artisan时报错
php artisan
[ErrorException] Illegal offset type in unset
debug后发现是这段代码出错,
$this->app->singleton([ 'Toplan\\Sms\\SmsManager' => 'laravel-sms', ], function ($app) { $token = $app->request->header('access-token', null); if (empty($token)) { $token = $app->request->input('access_token', null); } $input = $app->request->all(); return new SmsManager($token, $input); });
猜测应该是新版本laravel的singletion绑定时不能再使用数组, 代码更改为如下后就正常了,
singletion
$this->app->singleton('Toplan\\Sms\\SmsManager', function ($app) { $token = $app->request->header('access-token', null); if (empty($token)) { $token = $app->request->input('access_token', null); } $input = $app->request->all(); return new SmsManager($token, $input); });
希望可以发布一个新版本修复一下,谢谢
The text was updated successfully, but these errors were encountered:
laravel-sms已发布2.6.2 phpsms已经发布1.7.1
Sorry, something went wrong.
No branches or pull requests
使用最新的laravel版本,使用本扩展,在执行
php artisan
时报错debug后发现是这段代码出错,
猜测应该是新版本laravel的
singletion
绑定时不能再使用数组,代码更改为如下后就正常了,
希望可以发布一个新版本修复一下,谢谢
The text was updated successfully, but these errors were encountered: