1
The excel export works well up to 10000 records but above that it returns me the error: "127.0.0.1 is Currently Unable to Handle this request. HTTP ERROR 500" Someone’s had that problem before?
public function getUsersRegion($region){
$region = is_array($region) ? $region : array($region);
$users = DB::table("users")
->join("regions", "users.region", "=", "regions.id")
->select("users.id" , "users.avatar", "users.first_name", "users.last_name", "users.email", "regions.name", "users.ref_code", "users.banned")
->whereIn("users.region", $region)
->orderBy("users.id", "desc")
->get();
return $users;
}
public function export($region, $format) {
$retorno = $this->getUsersRegion($region);
Excel::create('Painel Gerenciador de Conteudo', function($excel) use ($retorno, $format){
$excel->sheet('Painel Gerenciador de Conteudo', function($sheet) use ($retorno, $format){
$sheet->loadView('exports.export')->with('retorno',$retorno)->with('format',$format);
});
})->export($format);
}
I’ve had problems with her before, and in my case, she cried with far fewer records.
– Wallace Maxters