<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\FollowReport;
use App\Models\MatchDetail;
use App\Models\Matche;
use App\Models\Points;
use Highlight\Autoloader;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Intervention\Image\Facades\Image;
use PDF;
class MatchDetailController extends Controller {
public function downlaodReport($id)
{
$match = Matche::findOrFail($id);
$won= $this->getFinalResult($id);
$view='';
$customPaper = '';
switch ($_GET['name']) {
case 'omr':
$view = 'admin/ReportsPdf/report-pdf';
$customPaper = array(0, 0, 1200, 2000);
break;
case 'pmr':
$view = 'admin/ReportsPdf/pmr-report';
$customPaper = array(0, 0, 1200, 3000);
break;
default:
$view = 'admin/ReportsPdf/smr-report';
$customPaper = array(0, 0, 1000, 1100);
break;
}
$pdf = PDF::loadView($view, compact('match', 'won'))->setPaper($customPaper, 'potrait');
return $pdf->download($_GET['name'].'-report.pdf');
// return view('admin/ReportsPdf/pmr-report',compact('match','won'));
}
}
这是我的控制器代码,当我运行我的项目时php artisan serve
出现错误
当我尝试使用 xampp 运行我的项目时,超过了 60 秒的最大执行时间它可以正常工作任何解决方案吗?