belongsTo(StickersPack::class, 'name', 'pack'); } public function getImagePathAttribute(): string { return PUBLIC_STICKERS_PATH . '/' . $this->attributes['pack'] . '/' . $this->attributes['filename']; } public function getUrlAttribute(): string { return Image::getOrCreate($this->attributes['cache_hash']); } }