在Kernel.php
中运行函数时,Css float无法正常工作但它在正常的控制器功能中正常工作。
这是kernel.php
$schedule->call(function () {
$poolMail = EmailPool::where('status', 0)->get();
foreach($poolMail as $p)
{
$this->createReservationPdf($content['rcode']);
}
})->everyMinute();
public function createReservationPdf($resId)
{
$rsvData = \App\Reservation::where('reservation_code', $resId)->first();
$rsvPayment = \App\ReservationPayment::where('reservation_code', $resId)->first();
$rsvExtras = \App\RsvExtra::where('r_no', $resId)->get();
$rsvInsurances = \App\RsvInsurance::where('r_no', $resId)->get();
$pStation = \App\Station::where('istasyon_kodu', $rsvPayment->pstation)->first();
$rStation = \App\Station::where('istasyon_kodu', $rsvPayment->rstation)->first();
$carGroup = \App\Group::where('grp', $rsvPayment->vgroup)->first();
$pdf = \PDF::loadView('pdf.test', compact('rsvData', 'rsvPayment', 'rsvExtras', 'rsvInsurances', 'pStation', 'rStation', 'carGroup'));
return $pdf->save(storage_path().'/'.$resId.'.pdf');
}
createReservationPdf在任何其他控制器中运行良好。
实际上,它工作到几天前。