使用版本 : laravel5.4
遇到的错误1:
[ErrorException]
include(app/database/migrations/2014_08_06_120900_alter_xxx_table.php): failed to
open stream: No such file or directory
解决方式:
composer dump-autoload
参考文章:
遇到的错误2:
[Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tabl e users
add unique users_email_unique
(email
))
解决方式:
The issue solved by the following way.
Add the following code in AppServiceProvider.php
L5_root/app/Providers/AppServiceProvider.php
The code block
use Illuminate\Support\Facades\Schema; //Import Schema
function boot()
{
Schema::defaultStringLength(191); //Solved by increasing StringLength
}
参考文章:
https://github.com/laravel/framework/issues/17508