score:1

Accepted answer

Try this.

Rewrite route to the following:

Route::post('/quantityUpdate', 'QuantityController@quantityUpdate');

In your view file script, change to the following:

$('#products_table').Tabledit({ 
url: '/quantityUpdate', 
columns: { 
identifier: [0, 'id'], 
editable: [[4, 'quantity']] 
}, 

onSuccess: function(data, textStatus, jqXHR) { 
console.log(data); 
}, 
onFail: function(jqXHR, textStatus, errorThrown) { 

}, 
onAjax: function(action, serialize) { 

console.log("on Ajax"); 
console.log("action : ", action); 
console.log("data : ", serialize); 
} 
});

In your VerifyCsrfToken.php file:

protected $except = [
        '/quantityUpdate'
    ];

And finally, in your quantityUpdate controller, change the code to:

\Log::info($request->all());

and that should work.


Related Query

More Query from same tag