Closed Partoo closed 11 years ago
I try to change $keyword = '%'.Input::get('sSearch').'%'; to $keyword = '%'.urlencode(Input::get('sSearch')).'%';
No errors report,but can't find anything...
I found the way: https://github.com/bllim/laravel-datatables-bundle/issues/4
use "aoColumns": [ { "bSearchable": true }, null, null, {"bSearchable":false}, {"bSearchable":false}, {"bSearchable":false} ], disable timestamp field.
For who is reading this :
var oTable;
$(document).ready(function() {
oTable = $('#features').dataTable( {
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ 每页显示数量"
},
// this is for search column, specify witch is searchable
// in my case I have four colum: id, title, description, created_at
"aoColumns": [
{"bSearchable": false },
{"bSearchable": true },
{"bSearchable": true },
{"bSearchable":false},
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "{{ URL::to('admin/features/data') }}",
"fnDrawCallback": function ( oSettings ) {
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
}
});
});
Thanks for your work, but I find that can not search use Chinese character, of course, this maybe associated with laravel, you have any suggestions?