dbms_init...1
This commit is contained in:
parent
9c3aaee120
commit
07a1706ab0
@ -1 +1,9 @@
|
|||||||
\
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace App\Interfaces;
|
||||||
|
|
||||||
|
interface UserRepositoryInterface
|
||||||
|
{
|
||||||
|
public function getUserByEmail(string $email): ?array;
|
||||||
|
}
|
||||||
|
|||||||
21
app/Repositories/DbUserRepository.php
Normal file
21
app/Repositories/DbUserRepository.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user