improve road patrole controller and conect whit mission
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V3\RoadPatrole;
|
||||
|
||||
use App\Exports\V3\RoadPatrols\SupervisorCartableReport;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Cartables\RoadPatrolTableService;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
class SupervisorReportController extends Controller
|
||||
{
|
||||
public function supervisorCartableReport(Request $request, RoadPatrolTableService $roadPatrolTableService): BinaryFileResponse
|
||||
{
|
||||
$name = 'گزارش از کارتابل ارزیابی گشت راهداری ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||
$data = $roadPatrolTableService->supervisorCartableReport($request, true);
|
||||
return Excel::download(new SupervisorCartableReport($data['data']), $name);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user