Sael
Multiple create action
So as we all know, there is a default create action on the top of the table. However, i want to add another create action with different inputs. Is that possible?
Here i s what i tried so far. it did create two buttons, but the form is the same, how can i change the form of the new button?
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make('New2')
->label('Target'),
Actions\CreateAction::make('New1')
->modal(Product::class)
->form([
TextInput::make('title')
->required()
->maxLength(255),
]),
]; }
]; }
5 replies
Table query
So I am currently modifying the results of my table using ->modifyQueryUsing
however, I can still access the record, if I know the URL. how can I disable that?
For example:
http://localhost:8000/admin/column/ - base URL
However, if I add the number of record,
http://localhost:8000/admin/column/22/edit
I can now access that record. how do I disable them doing that?
2 replies