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()); } }