Call another model inside repeater, it is possible?
I want to use another model inside repeater form like this
but get error like this
Solution:Jump to solution
Ahh in a text column is different. So remove the Inventory from your $record. But what is InventoryLocationList, is it a model? can you access inventory from that model? if so: $record->inventory->qty ?
6 Replies
You can't do that since the record is passed in. What are you trying to do?
Thank you for your respond! I really appriciate it!
I want to count how many item that left to reserved, user can choose how many their want to use as long as the reserved quantity, but i want to count the reserved by relationship count like code below, because only stored in db stock quantity
Solution
Ahh in a text column is different. So remove the Inventory from your $record. But what is InventoryLocationList, is it a model? can you access inventory from that model? if so: $record->inventory->qty ?
Yes it's a model, and yes it's has relationship to inventory
So the above will work then
Thank you, it works! It seem like i need to take break so i can rest my brain because even simple solution i cant find XD