Skip to content
Advertisement

Laravel add action on rowdata (server side action)

I have generated Laravel Code with quickAdminpanel.

However, I would like to add a action to each row of a table, which generates a print job on the server. I tried a few things but I am not sure what is the propper way of extending the application to support this porpperly:

  1. each row should get the “action” button
  2. once clicked, server side code shuld get executed (generating the job and putting into the queue)
  3. ideally, a modal is shown to confirm this has been done

What I did so far: I modified resources/views/admin/table/index.blade.php to add the button I need, now this is to get the action (routing, controller etc.?) set up.

Sorry, this is a poor beginners question 🙁

Thanks for any feedback and help!

modified table view

Advertisement

Answer

It looks like it’s in the documentation:

https://blog.quickadminpanel.com/how-to-customize-vieweditdelete-buttons-column-in-ajax-datatables/

You can find the bit you are looking for under Customization 2. Add or Remove buttons.

There is also a list of other useful links in the documentation:

https://helpdocs.quickadminpanel.com/customizing-the-code/datatables-customizations

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement