restore set creation
This commit is contained in:
parent
4897cc2e20
commit
8ec7af8a1f
3 changed files with 21 additions and 0 deletions
|
|
@ -4,6 +4,15 @@ namespace App\Set;
|
|||
|
||||
class EloquentSetRepository implements SetRepository
|
||||
{
|
||||
public function create(CreateSetDto $dto): Set
|
||||
{
|
||||
$model = SetModel::create([
|
||||
'name' => $dto->name,
|
||||
]);
|
||||
|
||||
return $this->toDomain($model);
|
||||
}
|
||||
|
||||
public function find(int $id): ?Set
|
||||
{
|
||||
$model = SetModel::find($id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue