class PostProcessing extends Component implements HasActions, HasForms
{
use InteractsWithActions;
use InteractsWithForms;
public Media $image;
public function deleteImageAction(): Action
{
return Action::make('deleteImage')
->requiresConfirmation()
->action(function () {
// dispatch event to filament custom page
$this->dispatch('delete-media', $this->image->id);
});
}
}
class PostProcessing extends Component implements HasActions, HasForms
{
use InteractsWithActions;
use InteractsWithForms;
public Media $image;
public function deleteImageAction(): Action
{
return Action::make('deleteImage')
->requiresConfirmation()
->action(function () {
// dispatch event to filament custom page
$this->dispatch('delete-media', $this->image->id);
});
}
}