service-captcha/app/Repositories/RoleRepository.php

14 lines
251 B
PHP
Raw Normal View History

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