我是 Laravel 新手,我正在尝试使用 YajraBox 创建一个数据表扩展名。
我被困在 ajax Controller 上:
public function indexData(LotFilters $filters)
{
$lots = Lot::filter($filters)->get();
return Datatables::of($lots)->make(true);
}
这是我的路线:
Route::get('data', 'LotController@indexData');
当我去:http://127.0.0.1:8000/data
时,它给了我一个错误:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 140673944 bytes)
我认为我需要设置分页,但我没有找到如何做到这一点的示例,也许你们可以帮助我?
最佳答案
您正在发出可能会导致此错误的 get 请求。尝试发出发布请求。
关于php - DataTables YajraBox Laravel 扩展与 Eloquent 查询字符串过滤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44383954/