toplan / laravel-sms

:iphone::heavy_check_mark:A phone number validation solution based on laravel
MIT License
838 stars 174 forks source link

result_info 没有默认值 #9

Closed Lee2011 closed 9 years ago

Lee2011 commented 9 years ago

在发送验证码之前保存 sms 记录的时候 result_info 没有默认值,对于一些 MySQL 实例不能成功添加记录,建议在 save() 之前给 result_info 赋默认值(可以是空值)

[2015-08-13 16:41:26] local.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1364 Field 'result_info' doesn't have a default value' in /home/vcap/app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:380
...
#13 /home/vcap/app/vendor/toplan/laravel-sms/src/Toplan/LaravelSms/models/Sms.php(177): Illuminate\Database\Eloquent\Model->save()
#14 /home/vcap/app/vendor/toplan/laravel-sms/src/Toplan/LaravelSms/SmsContorller.php(76): Toplan\Sms\Sms->send()
#15 [internal function]: Toplan\Sms\SmsController->postSendCode('check_mobile_un...', '159xxxxxxxx')
toplan commented 9 years ago

好的谢谢反馈,我已提交更改, 你更新下试试吧

Lee2011 commented 9 years ago

给楼主的更新速度点个赞!