I have installed yajra/laravel-datatables-oracle package for supporting serverside datatables in laravel 5.1 with mongodb 3.3 as database. I have connected laravel 5.1 with mongodb through jenssegers-mongodb package. It is connecting successfully , but datatable is not working properly.
js
$('#vendorDatatable').DataTable({
"processing": true,
"serverSide": true,
"order": [[ 0, "desc" ]],
"ajax": baseUrl+'/vendors/data',
"columns": [
{"data": 'branch', "name": 'branch'}
],
});
Route
Route::get('vendors/data','VendorsController@getList');
VendorsController
public function getList(){
$vendors = Vendors::select(['branch']);
return Datatables::of($vendors)->make();
}
Error while accessing ../vendors/data
FatalErrorException in Builder.php line 1309: Call to a member function compileSelect() on a non-object