DeleteAction throws error on custom header
I have created a custom header for my page and added this code to the header:
Code for my page looks like this:
What I want to achieve is to have Delete button on viewPage header. But I keep getting error saying
"Filament\Actions\DeleteAction::Filament\Actions{closure}(): Argument #1 ($record) must be of type Illuminate\Database\Eloquent\Model, null given, called in \vendor\filament\support\src\Concerns\EvaluatesClosures.php on line 35"
If I put regular Action or EditAction instead of DeleteAction, it works as expected, What am I missing?
Solution:Jump to solution
Just create your own delete action? The DeleteAction is designed for a form page not view pages
1 Reply
Solution
Just create your own delete action? The DeleteAction is designed for a form page not view pages