Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit e2eb6ea

Browse files
author
Robert Kummer
committed
Relation Repositories updated
1 parent 910b61b commit e2eb6ea

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/Contracts/OneToManyRelationRepository.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,13 @@ interface OneToManyRelationRepository extends RelatedRepository
1414
* @return Model[]|Collection|mixed
1515
*/
1616
public function getMany($model);
17+
18+
/**
19+
* returns item request
20+
*
21+
* @param Model|mixed $model
22+
* @param string|int $id
23+
* @return Model|mixed
24+
*/
25+
public function findRelated($model, $id);
1726
}

src/Contracts/OneToOneRelationRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Database\Eloquent\Model;
66

7-
interface OneToOneRelationRepository
7+
interface OneToOneRelationRepository extends RelatedRepository
88
{
99
/**
1010
* returns collection request

src/Contracts/RelatedRepository.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22

33
namespace Ipunkt\LaravelJsonApi\Contracts;
44

5-
use Illuminate\Database\Eloquent\Model;
6-
75
interface RelatedRepository
86
{
9-
/**
10-
* returns item request
11-
*
12-
* @param Model|mixed $model
13-
* @param string|int $id
14-
* @return Model|mixed
15-
*/
16-
public function findRelated($model, $id);
177
}

0 commit comments

Comments
 (0)