Skip to content

Instantly share code, notes, and snippets.

@sokhomhuy
Last active April 11, 2018 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sokhomhuy/376217a28e66e977ed7d8980cba9cc00 to your computer and use it in GitHub Desktop.
Save sokhomhuy/376217a28e66e977ed7d8980cba9cc00 to your computer and use it in GitHub Desktop.
Laravel 5.5: Specified key was too long error
As outlined in the Migrations guide to fix this all you have to do is edit your
AppServiceProvider.php file and inside the boot method set a default string length:
=> app->Providers->AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment