change export for safty proivecy
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Services\Cartables\SafetyAndPrivacy\OperatorService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use PhpOffice\PhpSpreadsheet\Exception;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
class ConstructionActivityController extends Controller
|
||||
@@ -38,6 +39,11 @@ class ConstructionActivityController extends Controller
|
||||
'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function countryExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
{
|
||||
$data = $operatorService->countryActivity(89);
|
||||
@@ -46,6 +52,10 @@ class ConstructionActivityController extends Controller
|
||||
return Excel::download(new ExcelReport($data), $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function provinceExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
{
|
||||
$data = $operatorService->provinceActivity(
|
||||
|
||||
Reference in New Issue
Block a user