vendredi 25 novembre 2016

How to save inline edit data in laravel controller

Hi I'm doing displaying data in datatable using jQuery Datatable here i have to edit data using inline edit i'm able to edit but not able to save in database.

Please let me know how to do this.

Here is the code i have tried

var editor = new $.fn.dataTable.Editor({
    ajax: {
        "url": public_path +'save/edit-provider-cpt-codes/',
        "data": function(d) {
           console.log(d.data)
            return $.extend({}, d, {
               // "id": $('#account_type').val()
            });
        }
    },  
    table: "#edit-provider-cpt-codes",
    idSrc:  'id',
    fields: [{

            name: "id"
        }, {

            name: "provider_name"
        }, {

            name: "cpt_code"
        }]
   });

   $('#edit-table').on( 'click', 'tbody tr td:not(:first-child)', function (e) {
    editor.inline( this, {
        onBlur: 'submit'
    });
   });

In controller How would i get the value of editable field.

Please help me out.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire