I found that when doing a new install of Laravel 5.4 and using the files supplied in the /database/migrations/ folder, specifically “2014_10_12_1000000_create_password_resets_table.php”, I ran into the following error:
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tab
le `password_resets` add index `password_resets_email_index`(`email`))[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Changing line 17 from:
$table->string('email')->index();
To:
$table->string('email');
Fixed the issue.
I’m assuming that the need for an Index on the email column is really not necessary since there shouldn’t be that many rows in this table to begin with.
Let me know if this fixed your issue.