Anyway of accessing $record inside of View::make()->components() ?

following code is trying to iterate thru a json, so that the toggle works View::make('view')->view('tables.columns.delivery') ->components( function($record) { $components = []; foreach($record->itens as $key => $item) { $components[] = ToggleColumn::make('itens.'.$key.'.Entregue') ->label($item['Nome']); } return $components; } ) before i was doing: ToggleColumn::make('itens.1.Entregue') ->label('Algo') It was working, but i need to iterate thru the json, but i cant access $record, something im doing wrong?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server