Skip to content

Instantly share code, notes, and snippets.

@savepong
Last active January 9, 2018 09:49
Show Gist options
  • Save savepong/dcc830b0d34cc47572bfd66950911c54 to your computer and use it in GitHub Desktop.
Save savepong/dcc830b0d34cc47572bfd66950911c54 to your computer and use it in GitHub Desktop.
Laravel : Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
<?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()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment