improve code in controller and form request for V3 whit pint package
This commit is contained in:
@@ -10,7 +10,6 @@ use App\Http\Traits\ApiResponse;
|
||||
use App\Models\RoadObservationHistory;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Services\Cartables\RoadObservation\SupervisorService;
|
||||
use App\Services\Cartables\RoadObservationTableService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -48,7 +47,7 @@ class SupervisorController
|
||||
|
||||
public function report(Request $request, SupervisorService $supervisorService): BinaryFileResponse
|
||||
{
|
||||
$name = 'گزارش از کارتابل ارزیابی واکنش سریع '. verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||
$name = 'گزارش از کارتابل ارزیابی واکنش سریع '.verta()->now()->format('Y-m-d H:i').'.xlsx';
|
||||
$data = $supervisorService->index($request);
|
||||
|
||||
return Excel::download(new SupervisorCartableReport($data['data']), $name);
|
||||
@@ -89,4 +88,4 @@ class SupervisorController
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user