Tables\Actions\DeleteAction::make() before or after method How to access record value inside?

I am trying to build validation before deleting the record from the table .. How do I access the record values inside the before function? Any help please.. thank you! Tables\Actions\DeleteAction::make() ->before(function () { // $deleted_record = $this->record ??? }
Solution:
function ($record) { ... }
Jump to solution
3 Replies
Solution
Patrick Boivin
Patrick Boivin14mo ago
function ($record) { ... }
Strategic
StrategicOP14mo ago
Thank you! Thank you! you are beautiful soul!
DrByte
DrByte14mo ago
There are a bunch more possible things you can access just by following the right naming. Here's a list for things in Tables, but they apply in other places too: https://filamentphp.com/docs/3.x/tables/columns/advanced#injecting-the-current-eloquent-record
Want results from more Discord servers?
Add your server