22 lines
396 B
PHP
22 lines
396 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Interfaces\UserRepositoryInterface;
|
|
use App\Models\UserModel;
|
|
|
|
class DbUserRepository implements UserRepositoryInterface
|
|
{
|
|
protected $model;
|
|
|
|
public function __construct(UserModel $model)
|
|
{
|
|
$this->model = $model;
|
|
}
|
|
|
|
public function getUserByEmail(string $email): ?array
|
|
{
|
|
return $this->model->where('email', $email)->first();
|
|
}
|
|
}
|