Error yang muncul

[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))

Buka file app/Providers/AppServiceProvider.php

Ubah

    public function boot()
    {
     	//
    }

menjadi

    public function boot()
    {
     	\Schema::defaultStringLength(191);
    }

Leave a comment

Your email address will not be published. Required fields are marked *