service-captcha/app/Repositories/UserRepository.php

15 lines
295 B
PHP
Raw Normal View History

2023-07-06 10:48:32 +06:00
<?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();
}
}