Skip to content

Instantly share code, notes, and snippets.

@alejandrofloresm
Created January 31, 2019 17:47
Show Gist options
  • Select an option

  • Save alejandrofloresm/c936ebf1bf3e737d4a18a2f570331d5b to your computer and use it in GitHub Desktop.

Select an option

Save alejandrofloresm/c936ebf1bf3e737d4a18a2f570331d5b to your computer and use it in GitHub Desktop.
Laravel AppServiceProvider.php for AMPPS
<?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()
{
// Solves the problem
// Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Schema::defaultStringLength(191);
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment