| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 90.91% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait WithImages |
||
| 11 | { |
||
| 12 | use Helpers; |
||
| 13 | |||
| 14 | public static function bootWithImages(): void |
||
| 19 | 4 | }); |
|
| 20 | 6 | }); |
|
| 21 | 2 | } |
|
| 22 | |||
| 23 | 6 | public function image(): MorphOne |
|
| 24 | { |
||
| 25 | 6 | return $this->morphOne(Image::class, 'uploadable')->whereNull('extra')->latest('id'); |
|
| 26 | } |
||
| 27 | |||
| 28 | 6 | public function images(): MorphMany |
|
| 31 | } |
||
| 32 | |||
| 33 | 2 | public function bindImage(File $image, $extra = null): self |
|
| 38 |