15 lines
295 B
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();
|
|
}
|
|
}
|