Mari Kita Bangun Screencast
50 Episodes
Setting Untuk Perizinan UserEps. 4 13:07
NIAGAHOSTER
Promo Hosting diskon sampai 81%. Pakai kode kupon PARSINTA untuk tambahan diskon 10%.Premium sponsor
Klik disini
Hiero

Hiero

1 year ago

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table permissions add unique permissions_name_guard_name_unique(name, guard_name))

Ini terjadi ketika install spatie bg.

Kira kira ada solusi

Irsyad A. Panjaitan

Irsyad A. Panjaitan

1 year ago·Edited

As outlined in the Migrations guide to fix this all you have to do is edit your AppServiceProvider.php file and inside the boot method set a default string length:

use Illuminate\Support\Facades\Schema;

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

After that everything should work as normal. If you enjoyed this post be sure and join the weekly Laravel newsletter and never miss out on new releases, framework tips, and new tutorials.

Source: Laravel News

Login untuk berkomentar