danielspravtsev
Form builder component properties render
Hey there!
Can somebody point me where ViewComponent protected properties goes into view render?
I only see something like default Laravel behaviour with view('view-name', $this->data()) — where ->data() - collects public properties & methods, but how does protected properties goes here? 🙂
Where is this secret method that collects protected properties from component?
Would much appreciate your help, guys! @danharrin @zepfietje @awcodes
13 replies
How to trigger table action outside table with AlpineJS?
I have following table action. How to trigger it (and pass record id) from menu.blade(not filament admin) with alpinejs?
protected function getTableActions(): array
{
return [
Action::make('balance')
->label('Change balance')
->form([
TextInput::make('new_balance')
->default(fn (Sim $record) => $record->balance)
->label('New balance')
->numeric()
->step(0.01)
->minValue(0)
->required()
])
->action(function (Sim $record, array $data){
$record->update(['balance' => $data['new_balance']]);
Notification::make()->success()->title('Balance updated!')->send();
})
->modalButton('Update balance'),
];
}
2 replies