Closed as not planned
Description
- Laravel-mongodb Version: 3.8
- PHP Version: 7.4
- Database Driver & Version: 1.9.0
Description:
after add $cast 'credit_balance' => 'decimal' on User.php
when print $user->credit_balance will get this exception
Expected behaviour
ErrorException Undefined offset: 1
\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasAttributes.php:557
return $this->asDecimal($value, explode(':', $this->getCasts()[$key], 2)[1]);
Actual behaviour
Tell us what happens instead