Closed aescasio closed 7 years ago
Please see upgrade guide as there are breaking changes.
return $this->datatables
->eloquent($this->query())
Should be replace to something like:
return datatables()->eloquent($this->query())...
Hi @yajra
Thanks so much for enlighten things around.
But before that, to solve things around I use the code below that output pretty the same.
use Yajra\DataTables\EloquentDataTable;
$dataTable = new EloquentDataTable($query);
return $dataTable->addColumn('action', 'someviews.datatables_actions');
Hi,
Before in Laravel 5.4 the datables render with no problem, while using Laravel 5.5 it generate Internal Server Error: 500.
Popup
I use this code below in Laravel 5.5.11 which is exactly the same with the previous version Laravel 5.4:
GET http://localhost:8000/policies?draw=1&columns%5B0%5D%5Bdata%5D=name&columns%5B0%5D%5Bname%5D=name&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=description&columns%5B1%5D%5Bname%5D=description&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=action&columns%5B2%5D%5Bname%5D=action&columns%5B2%5D%5Bsearchable%5D=false&columns%5B2%5D%5Borderable%5D=false&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=0&order%5B0%5D%5Bdir%5D=asc&start=0&length=10&search%5Bvalue%5D=&search%5Bregex%5D=false&_=1506164857095 500 (Internal Server Error)