error 1071 laravel
- Open = app/Providers/AppServiceProvider.php
- add = use Illuminate\Support\Facades\Schema;
- add in method boot() = Schema::defaultStringLength(191);
Example:
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
}