I need without refresh listing page update status of record. I have tried it with full page refresh but I want to an AJAX feature with Laravel rules.
I need without refresh listing page update status of record. I have tried it with full page refresh but I want to an AJAX feature with Laravel rules.
2
Answers
If you like to update a record with Ajax you have to implement Ajax in your template and request a controller method that execute the change.
jQuery example:
This will post the page ID and status to the updateStatus controller method. On success you can update values in the DOM.
Controller example:
In the controller you search for the given ID in the Page model. Then you update the status, save it, and return the new status so you can use it in the front-end.
Add Jquery in footer
Add list view page this function
Add your datatables
In controller page