Skip to content

Instantly share code, notes, and snippets.

@earvinpiamonte
Last active June 26, 2020 04:19
Show Gist options
  • Save earvinpiamonte/51f31e64ba54c375c2166ef445b3ede5 to your computer and use it in GitHub Desktop.
Save earvinpiamonte/51f31e64ba54c375c2166ef445b3ede5 to your computer and use it in GitHub Desktop.
[Resolved] Laravel - "Specified key was too long error..." issue
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment