Hi,
I am using bllim\laravel4-datatables-package using the tutorial in the below link, I am able to get JSON output directly. This is a link
When I access the View, It shows only --- The table header along with processing message
When I click the "No. Page Entries(dropdown)" and then gets error ** Invalid JSON Resposne and then data's to the table is loaded
It doesn't loads the Data to the Table on First
Route::get('admin/memberslist', array('as' => 'memberslist', 'uses' => 'OrdersController@memberslist'));
public function memberslist()
{
$pages = Orders::select(array('id','name','email','updated_at'));
return Datatables::of($pages)
->make();
}
$('#articles').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "admin/memberslist",
"aaSorting": [[ 3, "desc" ]],
"aoColumns": [
{ 'sWidth': '60px' },
{ 'sWidth': '130px', 'sClass': 'center' },
{ 'sWidth': '180px', 'sClass': 'center' },
{ 'sWidth': '60px', 'sClass': 'center' },
]
});
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>name</th>
<th>Email</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
Why aren't you using regular HTML tables, where you have full control on all?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community