Datatable insert/update/delete Posting to Laravel - Token Problems

Can anyone help me please as I am tearing my hair out. Up until now playing with the webix tools has been a joy to use and very simple. I now have my datatable loading data externally from PHP and its bound to a form. Now I am trying to implement the PHP side to facilitate the insert, update and delete methods.

I am using Laravel and I really need to be able to send a CSRF_TOKEN along with every POST that webix makes.

Please, can anybody help?

EDIT: I have since done this and it works. Is there a more elegant solution or is this okay?

In the datatable on events I put this…

onSelectChange:function(){

var item = this.getItem(this.getSelectedId());

item._token = “{{csrf_token()}}”;

this.updateItem(this.getSelectedId());

}

There are two possible solutions

a) it possible to use onBeforeAjax event to intercept ajax calls and add any custom parameters

http://docs.webix.com/desktop__server_customload.html#modifyingbackgroundajaxrequests

b) for data saving calls, it is possible to intercept onBeforeUpdate event of dataprocessor and add the necessary parameter

{ view:"datatable", id:"dt1", save:"save.php" }
...
webix.dp("dt1").attachEvent("onBeforeUpdate", function(obj, data){
    data.data._token = "{{csrf_token()}}";
});