我正在尝试创建一个包含10万条记录的csv文件,但它已超时。如果我运行10 000条记录就可以了。
$users1 = Aapplicant::select(DB::raw('applicant.AppID as Application_ID,
tapplicant.Email,
tapplicant.AppDate as Application_Date,
tapplicant.AppIPAddress as IP_Address,
tapplicant.AppAffID as Affiliate_ID,
toutcome.Status as Application_Status,'))
->join('outcome', 'outcome.AppID', '=', 'applicant.AppID')
->where('AppDate', '>=', \Carbon\Carbon::now()->startOfMonth())
->orderBy('tapplicant.AppID', 'DESC')
->get();
Excel::create('tapplicant', function($excel) use($users1) {
$excel->sheet('Sheet 1', function($sheet) use($users1) {
$sheet->fromArray($users1);
});
})->store('csv');