PriceType::class, 'price' => 'integer', ]; } protected function priceTypeLabel(): Attribute { return Attribute::make( get: fn () => $this->price_type->label(), ); } protected function priceFormatted(): Attribute { return Attribute::make( get: fn () => 'Rp '.number_format($this->price, 0, ',', '.'), ); } public function product(): BelongsTo { return $this->belongsTo(Product::class); } }