I am using yajrabox datatables on laravel 5.5. however when i added the columns search box it's works for two searches queries and then i search again i have this error Ajax 302 redirect and logged out. this is the html builder function that i am using to build the table
public function html()
{
return $this->builder()
->columns($this->getColumns())
->minifiedAjax()
->parameters([
'colReorder'=> true,
'responsive'=> true,
'dom' => 'Bfrtip',
'lengthMenu' => [[10,25,50,-1], [10,25,50,'All Record']],
'DeferLoading'=> 0,
'buttons' => [
['text' => '<i class="fa fa-user-o"> New Admin</i>'],
['extend'=>'colvis', 'text'=>'<i class="fa fa-angle-down"> Show/Hide Columns</i>'],
['extend'=> 'collection', 'text'=>'<i class="fa fa-file-o"> Export</i>','buttons'=>[
['extend'=> 'print', 'exportOptions'=> [ 'columns'=> [':visible' ]]],
['extend'=> 'copyHtml5', 'exportOptions'=> [ 'columns'=> [':visible' ]]],
['extend'=> 'csv', 'exportOptions'=> [ 'columns'=> [':visible' ]]],
['extend'=> 'excelHtml5', 'exportOptions'=> [ 'columns'=> [':visible' ]]],
['extend'=> 'pdfHtml5', 'exportOptions'=> [ 'columns'=> [':visible' ]]],
]],
],
'initComplete' => "function () {
this.api().columns().every(function () {
var column = this;
var input = document.createElement(\"input\");
$(input).appendTo($(column.footer()).empty())
.on('change', function () {
column.search($(this).val(), false, false, true).draw();
});
});
}",
]);
}
if i used the default search box that comes with the datatables it works fine even if i don't tens of searches queries
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DgGS8B
via IFTTT
Aucun commentaire:
Enregistrer un commentaire