14 lines
251 B
PHP
14 lines
251 B
PHP
<?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();
|
|
}
|
|
}
|