Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Laravel database key length problem solve code here....
- Problem: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 byte
- Web site solve link : https://stackoverflow.com/questions/42244541/laravel-migration-error-syntax-error-or-access-violation-1071-specified-key-wa
- Add the following code to AppServiceProvider.php
- File location: app/Providers/AppServiceProvider.php
- use Illuminate\Support\Facades\Schema; //Import Schema
- function boot()
- {
- Schema::defaultStringLength(191); //Solved by increasing StringLength
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement