| @@ 15-22 (lines=8) @@ | ||
| 12 | * |
|
| 13 | * @return $this |
|
| 14 | */ |
|
| 15 | public function belongsTo($selectable) |
|
| 16 | { |
|
| 17 | if (method_exists($selectable, 'display')) { |
|
| 18 | $this->display($selectable::display()); |
|
| 19 | } |
|
| 20 | ||
| 21 | return $this->displayUsing(Displayers\BelongsTo::class, [$selectable]); |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @param string $selectable |
|
| @@ 29-36 (lines=8) @@ | ||
| 26 | * |
|
| 27 | * @return $this |
|
| 28 | */ |
|
| 29 | public function belongsToMany($selectable) |
|
| 30 | { |
|
| 31 | if (method_exists($selectable, 'display')) { |
|
| 32 | $this->display($selectable::display()); |
|
| 33 | } |
|
| 34 | ||
| 35 | return $this->displayUsing(Displayers\BelongsToMany::class, [$selectable]); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Upload file. |
|