Skip to content

Instantly share code, notes, and snippets.

@samlovescoding
Created October 20, 2019 17:16
Show Gist options
  • Save samlovescoding/e3db596dada06ba87aa8d276be26b915 to your computer and use it in GitHub Desktop.
Save samlovescoding/e3db596dada06ba87aa8d276be26b915 to your computer and use it in GitHub Desktop.
Laravel MySQL Default String Length
<?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); //NEW: Increase StringLength
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment