You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaration of Decimal\DecimalObjectCast::asDecimal(Decimal\Decimal $value, $decimals) should be compatible with Illuminate\Database\Eloquent\Model::asDecimal($value, $decimals)
is there have a readme about this package?
The text was updated successfully, but these errors were encountered:
Have you checked the usage of decimal casts without the package?
See Laravel documentation
Probably the solution to your problem: The Laravel docs say you must specify number of digits for casts to type decimal, for example 'price' => 'decimal:64' instead of just 'decimal'.
Just FYI, for Laravel 7.x and up it might be easier to define a Custom Cast class - with a get() method that converts the null|string value from the DB to a null|Decimal, and a set() method that does the reverse.
I use this package like this:
but have error.
is there have a readme about this package?
The text was updated successfully, but these errors were encountered: