Php artisan migrate fails Laravel [duplicate]
you have to do is edit your AppServiceProvider.php on App\Providers\AppServiceProvider
file and inside the boot method set a default string length:
use Illuminate\Support\Facades\Schema;public function boot(){ Schema::defaultStringLength(191);}
Then drop the database manually then composer dump-autoload
and php artisan migrate
Edit AppServiceProvider.php
file, you will find this file in app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Schema;public function boot(){ Schema::defaultStringLength(191);}
Then run
composer update
on your terminal. Then try migrating your script, It would solve your problem.