MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.2k stars 259 forks source link

Delete method #351

Closed Slobug closed 2 years ago

Slobug commented 3 years ago

Hello,

Thank you for this great tool.

How is it possible to act before or after a delete?

I would like to combine another action.

Thank you in advance.

abbasmashaddy72 commented 2 years ago

You Should Create Your own method and include it with Coloum Callback.

Column::callback(['values you want to pass'], function (php declared values with $) { return view(your view location', compcat('params)); })->unsortable()->label('Action'),

abbasmashaddy72 commented 2 years ago

For more details, you can check: https://github.com/MedicOneSystems/demo-livewire-datatables/blob/master/app/Http/Livewire/ActionsDemoTable.php

Slobug commented 2 years ago

You Should Create Your own method and include it with Coloum Callback.

Column::callback(['values you want to pass'], function (php declared values with $) { return view(your view location', compcat('params)); })->unsortable()->label('Action'),

Thanks, I go to try it.

but I would have preferred to intercept the original function.