Added console command to add user with admin role.

This commit is contained in:
2023-07-02 16:17:18 +06:00
parent d0bd480dc1
commit 6b2aff910b
8 changed files with 341 additions and 0 deletions

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