Sens420
...\Tables\Columns\Concerns\{closure}(): Return value must be of type ?string, Money\Money return
Nevermind, I found a solution on LaravelDaily.
public function get(Model $model, string $key, mixed $value, array $attributes): float
{
// Transform the integer stored in the database into a float.
return round(floatval($value) / 100, precision: 2);
}
7 replies