File manager - Edit - /var/www/html/ciosp/api/app/Http/Controllers/VehiclePartController.php
Back
<?php namespace App\Http\Controllers; use App\Http\Requests\VehiclePartRequest; use App\Http\Services\VehiclePartService; use App\Models\VehiclePart; class VehiclePartController extends Controller { private VehiclePartService $vehiclePartService; public function __construct() { $this->vehiclePartService = new VehiclePartService; } public function index() { $response = $this->vehiclePartService->index(); return response()->json($response->data, $response->code); } public function store(VehiclePartRequest $request) { $response = $this->vehiclePartService->store($request); return response()->json($response->data, $response->code); } public function show(VehiclePart $vehiclePart) { $response = $this->vehiclePartService->show($vehiclePart); return response()->json($response->data, $response->code); } public function update(VehiclePartRequest $request, VehiclePart $vehiclePart) { $response = $this->vehiclePartService->update($request, $vehiclePart); return response()->json($response->data, $response->code); } public function destroy(VehiclePart $vehiclePart) { $response = $this->vehiclePartService->destroy($vehiclePart); return response()->json($response->data, $response->code); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings