'integer', 'type' => PriceType::class, ]; } // 3. Attribute public function priceFormatted(): Attribute { return Attribute::make( get: fn () => 'Rp '.number_format($this->price, 0, ',', '.'), ); } public function priceInput(): Attribute { return Attribute::make( get: fn () => (string) $this->price, ); } // 4. Relation public function variant(): BelongsTo { return $this->belongsTo(ProductVariant::class, 'variant_id'); } }