Skip to content

Instantly share code, notes, and snippets.

@jonpemby
Created October 17, 2017 19:53
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 jonpemby/60786101022ae8ff0f6ee8998492c94f to your computer and use it in GitHub Desktop.
Save jonpemby/60786101022ae8ff0f6ee8998492c94f to your computer and use it in GitHub Desktop.
How to fix Laravel key length more than limit (Laravel ~5.5)
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use 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