Call another model inside repeater, it is possible?

I want to use another model inside repeater form like this
->maxValue(fn(Inventory $record) => dd($record))


but get error like this
App\Filament\Resources\InventoryLocationResource::App\Filament\Resources\{closure}(): Argument #1 ($record) must be of type App\Models\Inventory, App\Models\InventoryLocationList given, called in D:\asc\vendor\filament\support\src\Concerns\EvaluatesClosures.php on line 35
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 ?
Was this page helpful?