From b82917d43a4741fbde8c919fb8ec9af558642f63 Mon Sep 17 00:00:00 2001 From: Fady Mondy Date: Wed, 24 Apr 2024 11:58:53 +0200 Subject: [PATCH] fix install command --- src/Console/TomatoRolesInstall.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Console/TomatoRolesInstall.php b/src/Console/TomatoRolesInstall.php index 9672934..733951f 100644 --- a/src/Console/TomatoRolesInstall.php +++ b/src/Console/TomatoRolesInstall.php @@ -56,11 +56,11 @@ public function handle(): void ]); $role = Role::where('name', 'admin')->first(); - $mainAccount->roles()->attach([$role->id]); + $mainAccount->roles()->sync([$role->id]); } else { $role = Role::where('name', 'admin')->first(); - $mainAccount->roles()->attach([$role->id]); + $mainAccount->roles()->sync([$role->id]); } $this->info('🍅 Try to login /admin/login with user "admin@admin.com" and password "password"'); $this->info('🍅 Tomato Roles installed successfully.');