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