Hello,
I followed the doc to setup a money field on a model
-
Created amount (float) and currency_id (integer) in database table for that model
-
Added 'Initbiz.Money.Behaviors.MoneyFields' in behaviors
-
defined my money field in fields.yaml
price: label: 'price' type: money span: auto mode: amountcurrency -
Added $moneyFields array
protected $moneyFields = [ 'price' => [ 'amountColumn' => 'amount', 'currencyIdColumn' => 'currency_id' ] ];
When I go to my model, I got the following error :
"Invalid argument supplied for foreach()" on line 25 of /plugins/initbiz/money/behaviors/MoneyFields.php
What did I miss ?
Last updated