| 1 | <?php |
||
| 12 | class Repository implements RepositoryInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Eloquent model. |
||
| 16 | * |
||
| 17 | * @var \Illuminate\Database\Eloquent\Model |
||
| 18 | */ |
||
| 19 | protected $model; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Repository constructor. |
||
| 23 | * |
||
| 24 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 25 | * |
||
| 26 | * @author Harlequin Doyon |
||
| 27 | */ |
||
| 28 | public function __construct($model) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get all records. |
||
| 35 | * |
||
| 36 | * @return \Illuminate\Database\Eloquent\Collection|static[] |
||
| 37 | * |
||
| 38 | * @author Harlequin Doyon |
||
| 39 | */ |
||
| 40 | public function all() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Find a certain record. |
||
| 47 | * |
||
| 48 | * @param int $id |
||
| 49 | * |
||
| 50 | * @return \Illuminate\Database\Eloquent\Model |
||
| 51 | * |
||
| 52 | * @author Harlequin Doyon |
||
| 53 | */ |
||
| 54 | public function find($id) |
||
| 58 | } |
||
| 59 |