laravel问题汇总

// 错误:

—— ErrorException with message 'include (/home/Vagrant/Code/LaraBBS): failed to open stream: Success'?

执行:

composer dump

 

 

// migration重命名字段报错,报错为:

—— Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found

解决:

1、在 composer.json下添加 "doctrine/dbal": "~2.3"

"require": {
 "php": ">=7.0.0",
    ...
 "doctrine/dbal": "~2.3"
 },

执行 composer dump

 

 

// 错误

—— failed to open stream: No such file or directory

解决方法:

composer dump     // 明明存在,报不存在,说明 composer的 autoload 不行了
composer install // 有时候执行这个

 

 

// 取消请求频率限制: 

描述:Laravel 默认了频率限制,为60秒,当频繁的请求的时候就会被限制,要取消的话,/app/Http/Kernel.php下,注释掉 'api'=> 下面的 'throttle:60,1',

'api' => [
    // 'throttle:60,1',
    'bindings',
],

 

 

//Redis (error) NOAUTH Authentication required.解决方法

解决方法:.env文件设置redis密码

 

 

 

 

 

 

 

 

————占位符

posted @ 2018-12-29 10:28  小寒1206  阅读(152)  评论(0编辑  收藏  举报