fix: user seeder issues

pull/17/head
Saiful Alam 2 years ago
parent 890a81fe75
commit 596eba9730

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

Loading…
Cancel
Save