Passing ID to a custom header action in show page
Hello ! I'm having an issue when trying to create a specific resource. I basically have my MainResource show page and I add this inside :
protected function getHeaderActions(): array
{
return [
Actions\Action::make('create patient')
->url(PatientResource::getUrl('create'))
->label('Ajouter un patient')
];
}
this resource is related to my MainResource and it's like adding Patient to my Main, but I need to set the current Main Model id to the Patient I create, I don't know if that' clear π
1 Reply
The thing is that I don't know how to retrieve the Main ID inside PatientResource
Should I use a relation manager ?