crud
crud copied to clipboard
The value of Button in form is being overwritten
I am trying to add a submit button at the end of the form.
public function fields(): array
{
return [
// other fields ...
Button::make($this::updateButtonLabel())
->class('btn btn-primary')->method('update')
];
}
The button is being added and seems to be working.
But the problem is, the button value is being overwritten and becoming model[Update ResourceName]
.

How can I avoid this and keep the button name as is? Can anyone help?
You can add a language string like:
Update ResourceName
: new string
for example:
"Update ResourceName": "Update record"