zizaco/entrust配置过程中出错
-
错误详情:
D:\xampp\htdocs\vitahomebackend>php artisan entrust:migration In BoundMethod.php line 135: Method Zizaco\Entrust\MigrationCommand::handle() does not exist -
错误原因:
在
laravel 5.5中才遇到 -
解决方法:
参考:
在
vendor\zizaco\entrust\src\commands\目录下找到Zizaco\Entrust\MigrationCommand这个文件,然后里面又个fire方法改成handle方法
Linux下执行composer install报错
-
错误详情:
Failed to download xxx/xxx from dist: The zip extension and unzip command are both missing, skipping. The php.ini used by your command-line PHP is: /etc/php/7.1/cli/php.ini Now trying to download from source -
错误原因:
缺少 zip unzip 包
-
解决方法:
参考:
apt-get install zip unzip
使用Cache时报错
-
错误详情:
BadMethodCallException: This cache store does not support tagging. -
错误原因:
.env中的CACHE_DRIVER未修改,CACHE_DRIVER值默认为file,而文件(file)和数据库驱动不支持标记(tagging) -
解决方法:
参考:
CACHE_DRIVER=array
$table->timestamps();生成的created_at和updated_at时间错误
-
错误详情:
使用
$table->timestamps();,插入到数据表中的created_at和updated_at字段值不正确,不是当前时间 错误原因:未设置时区
-
解决方法:
Laravel工程目录下,修改app/config/app.php文件:// 默认为 'timezone'='UTC' 'timezone'='Asia/Shanghai'