Added console command to add user with admin role.
This commit is contained in:
13
app/Repositories/RoleRepository.php
Normal file
13
app/Repositories/RoleRepository.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\Role;
|
||||
|
||||
final readonly class RoleRepository
|
||||
{
|
||||
public function getRoleBySlug(string $slug): ?Role
|
||||
{
|
||||
return Role::query()->where('slug', $slug)->first();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user