improve road patrole controller and conect whit mission
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V3\RoadPatrole;
|
||||
|
||||
use App\Exports\V3\RoadPatrols\OperatorCartableReport;
|
||||
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 OperateorReportController extends Controller
|
||||
{
|
||||
public function operatorCartableReport(Request $request, RoadPatrolTableService $roadPatrolTableService): BinaryFileResponse
|
||||
{
|
||||
$name = 'گزارش از کارتابل عملیات گشت راهداری ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||
$data = $roadPatrolTableService->operatorCartableReport($request, true);
|
||||
return Excel::download(new OperatorCartableReport($data['data']), $name);
|
||||
}}
|
||||
Reference in New Issue
Block a user