function table(csrf, tableId, url, where) {
    $(tableId).dataTable().fnDestroy()
    var datatable = $(tableId).DataTable({ 
        "processing": true, 
        "serverSide": true, 
        "ordering": false,
        "pageLength": 10,
        "scrollX": true,
        "scrollY": true,
        "dom": 't<"bottom datatable-ext"fpi>',
        "ajax": {
            "url": url,
            "type": "POST",
            "data": {
                "sistemator_token": csrf,
                "where": where,
            },
            "dataSrc": function(response) {
                $('input[name=sistemator_token]').val(response.sistemator_token);
                return response.data;
            }
        },
        "columnDefs": [{
            "targets": [0],
            "orderable": false
        }]
    });
    $('.dataTables_filter').addClass('datatable-filter');
    $('.dataTables_info').addClass('datatable-info');
}