| 1 | <?php |
||
| 24 | class Repository implements RepositoryInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Eloquent model. |
||
| 28 | * |
||
| 29 | * @var \Illuminate\Database\Eloquent\Model |
||
| 30 | */ |
||
| 31 | protected $model; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Repository constructor. |
||
| 35 | * |
||
| 36 | * @param \Illuminate\Database\Eloquent\Model $model |
||
| 37 | * |
||
| 38 | * @author Harlequin Doyon |
||
| 39 | */ |
||
| 40 | 6 | public function __construct($model) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Get all records. |
||
| 47 | * |
||
| 48 | * @return \Illuminate\Database\Eloquent\Collection|static[] |
||
| 49 | * |
||
| 50 | * @author Harlequin Doyon |
||
| 51 | */ |
||
| 52 | public function all() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Find a certain record. |
||
| 59 | * |
||
| 60 | * @param int $id |
||
| 61 | * |
||
| 62 | * @return \Illuminate\Database\Eloquent\Model |
||
| 63 | * |
||
| 64 | * @author Harlequin Doyon |
||
| 65 | */ |
||
| 66 | public function find($id) |
||
| 70 | } |
||
| 71 |