Laravel 5.6 : Specified key was too long error — codementor.tech
1 min readJul 4, 2018
Today i am writing about this topic because recently i came up with this “Specified key was too long error” error while running php artisan migrate command in laravel.
The solution was very easy just need to edit AppServiceProvide.php file but as i am developer so i have write blog at codementor.tech.
Solution -
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
If you want to read full specification and solution please visit THIS link.
Thanks for reading.
Happy Coding!
Cheers!