PriceType::class, 'price' => 'integer', ]; } public function variant(): BelongsTo { return $this->belongsTo(ProductVariant::class, 'variant_id'); } 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, ); } }