Skip to content

Instantly share code, notes, and snippets.

@ljahier
Created December 11, 2017 21:30
Show Gist options
  • Save ljahier/13260ff9840e33ae531a656268eafc50 to your computer and use it in GitHub Desktop.
Save ljahier/13260ff9840e33ae531a656268eafc50 to your computer and use it in GitHub Desktop.
For new laravel project, if you want use php artisan migration, you must add on AppServiceProvider.php file a few lines.
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema; // This line must be add
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191); // This line must be add
}
/**
* 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