Made authorization.
This commit is contained in:
14
app/Repositories/UserRepository.php
Normal file
14
app/Repositories/UserRepository.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user