From 596eba9730ed66a37fa30f6caf501293132c2c53 Mon Sep 17 00:00:00 2001 From: Saiful Alam Date: Sat, 25 Jun 2022 16:00:34 +0600 Subject: [PATCH] fix: user seeder issues --- database/seeders/UsersSeeder.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/database/seeders/UsersSeeder.php b/database/seeders/UsersSeeder.php index 4c874ab..d8a024a 100644 --- a/database/seeders/UsersSeeder.php +++ b/database/seeders/UsersSeeder.php @@ -2,7 +2,7 @@ namespace Database\Seeders; -use App\Models\Role +use App\Models\Role; use App\Models\User; use Illuminate\Support\Str; use Illuminate\Database\Seeder; @@ -29,10 +29,6 @@ class UsersSeeder extends Seeder 'password'=>Hash::make('hydra'), 'name'=>'Hydra Admin' ]); - $user->roles()->attach(Role::firstOrCreate([ - 'slug' => config('hydra.default_user_role_slug', 'user') - ],[ - 'name' => Str::title(config('hydra.default_user_role_slug', 'user')) - ])); + $user->roles()->attach(Role::where('slug', 'admin')->first()); } }