Kesalahan migasi mighvel
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Handsome Hawk
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Update your /app/Providers/AppServiceProvider.php to contain:
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
// Para resolver isso siga os passos abaixo:
// Edite o arquivo app\Providers\AppServiceProvider.php
// Adicione o namespace use Illuminate\Support\Facades\Schema;
// Dentro do método boot adicione Schema::defaultStringLength(191);
// Resultado final do arquivo:
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Path : App/Providers/AppServiceProvider
Schema::defaultStringLength(191);
in AppServiceProvider didn't work for me. What worked for was editing the database.php file in config folder. Just edit
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
to
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
and it should work, although you will be unable to store extended multibyte characters like emoji.
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',