xoco70 /
kendozone
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Repositories\Eloquent; |
||
| 4 | |||
| 5 | use App\Club; |
||
| 6 | |||
| 7 | class ClubRepository extends BaseRepository |
||
| 8 | { |
||
| 9 | |||
| 10 | |||
| 11 | /** |
||
| 12 | * Specify Model class name |
||
| 13 | * |
||
| 14 | * @return mixed |
||
| 15 | */ |
||
| 16 | function model() |
||
|
0 ignored issues
–
show
|
|||
| 17 | { |
||
| 18 | return Club::class; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getFederationWithPresidentAndFederation() |
||
| 22 | { |
||
| 23 | return Club::with('president', 'association.federation'); |
||
| 24 | } |
||
| 25 | |||
| 26 | |||
| 27 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.