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