我是使用框架的新手,我测试了Laflux。 我能做"插入"到DB但是当列出到表时,我得到错误" DataTables警告:table id = datatable-buttons - Ajax错误。有关此错误的详细信息,请参阅http://datatables.net/tn/7"。 下面是从表中获取数据。知道出了什么问题吗? 提前致谢
public function getQuery()
{
$filter_trashed = \Input::get('filter_trashed');
$pages = \DB::table('pages')
->select('id', 'title', 'layout','status', 'created_at');
if($filter_trashed == 1){
$pages = $pages->where('deleted_at','<>', NULL);
}else{
$pages = $pages->where('deleted_at', NULL);
}
return \Datatables::of($pages)
->editColumn('sl', '<input type="checkbox" name="cid[]" value="{{$id}}" class="cid_checkbox"/>')
->editColumn('status', '@if($status==1) <span class="glyphicon glyphicon-ok"> Published</span> @else <span class="glyphicon glyphicon-remove"> Unpublished</span> @endif')
->editColumn('created_at', '{{date("M-j-Y",strtotime($created_at))}}')
->make(true);
}