'decimal:2']; } public function product(): BelongsTo { return $this->belongsTo(Product::class); } /** * Price formatted for display, e.g. "€9.99" ("€0" for free plans). */ public function formattedPrice(): string { return (float) $this->price == 0 ? '€0' : '€'.number_format((float) $this->price, 2); } }