What is the cause:
The MySQL UNIQUE KEY key length limit is 1000 bytes and the system is trying to generate a larger key.
Correction :
Edit the file “vendor \ laravel \ framework \ src \ Illuminate \ Database \ Schema \ Builder.php”. Find the line below
public static $defaultStringLength = 255;
Change it as
public static $defaultStringLength = 250;
Remove the tables that were created in the database
– migrations
– users
Run php artisan migrate again .