Jeżeli uraczy cię taki błąd podczas migracji w Laravelu:
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
w App/Providers/AppServiceProvider.php dodaj do funkcji boot()
public function boot()
{
Schema::defaultStringLength(191);
}
i nie zapomnij o:
use Illuminate\Support\Facades\Schema;
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}