: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tabl e `users` add unique `users_email_unique`(`email`))
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Schema::defaultStringLength(191);
}
Also in PHP:
- 404 page in laravel
- Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query laravel
- date to timestamp ph
- check if key exists in associative array php
- date() php getting out
- exception handeling in php
- convert timestamp php
- array has not key in php
- @auth laravel
- fetch visitor ip address php
- create custom image size wordpress
- file_get_contents ssl accpet
- enc php code base64
- displaying laravel error in below input field
- date from unix timestamp php
- ! array_key_exists php
- captial functuon php
- error exec() is disabled for the security reason laravel
- codeigniter load form_validation
- eliminate duplicate values from associative array phph
- Laravel 8 seed
- check string in php
- codeigniter device
- array_key_exists in laravel