Laravel Migration Prob Solve:specified key was too long;max key length is 1000 bytes

sometimes when we run php artisan migrate we got Laravel Migration Problem : Syntax error or access violation, 1071 specified key was too long; max key length is 1000 bytes. For solution let’s follow the below steps.

Solutions Steps:

  1. Go to YourProjectFolder/app/providers/AppServiceProvider.php directory
  2. Add following line before Class

  3. Add this line inside boot function

    I mean like following
  4. lets go to our database and delete all the tables manually.
  5. then again run below line on the terminal.

     

Share with:


Comments are closed.