service-captcha/app/Repositories/UserRepository.php

15 lines
295 B
PHP

<?php declare(strict_types=1);
namespace App\Repositories;
use App\Models\User;
use Illuminate\Support\Str;
final readonly class UserRepository
{
public function getUserByEmail(string $email): ?User
{
return User::query()->where('email', Str::lower($email))->first();
}
}