dbms_init...1

This commit is contained in:
choi.jh 2025-06-25 10:46:08 +09:00
parent 9c3aaee120
commit 07a1706ab0
2 changed files with 30 additions and 1 deletions

View File

@ -1 +1,9 @@
\
<?php
namespace App\Interfaces;
interface UserRepositoryInterface
{
public function getUserByEmail(string $email): ?array;
}

View 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();
}
}