delete($image->path); }); } /** * @return BelongsTo */ public function product(): BelongsTo { return $this->belongsTo(Product::class); } /** * Address of the photo, without the site name, so it works on any local port. */ public function url(): string { return '/storage/'.$this->path; } }