Actions::make([
Action::make('extras')
->label('')
->color('primary')
->icon('heroicon-o-plus')
->form(function ($state, $form) {
$selectedItem = TeamProfileSelectedItem::find($state['id']);
return $form
->schema([
Repeater::make('extras')
->relationship('extras')
->model($selectedItem)
->columns(2)
->schema([
TextInput::make('qty'),
TextInput::make('name')
])
])
->model($selectedItem);
})
->action(function ($data) {
dd($data);
}),
]),
Actions::make([
Action::make('extras')
->label('')
->color('primary')
->icon('heroicon-o-plus')
->form(function ($state, $form) {
$selectedItem = TeamProfileSelectedItem::find($state['id']);
return $form
->schema([
Repeater::make('extras')
->relationship('extras')
->model($selectedItem)
->columns(2)
->schema([
TextInput::make('qty'),
TextInput::make('name')
])
])
->model($selectedItem);
})
->action(function ($data) {
dd($data);
}),
]),