belongsTo(GalleryCategory::class, 'category_id'); } protected function images(): Attribute { return Attribute::make( get: function ($value) { if (empty($value)) { return []; } $parts = explode(',', $value); return array_map(fn($part) => asset(trim($part)), $parts); } ); } }