File manager - Edit - /var/www/html/spdc/api/app/Http/Controllers/BenefitController.php
Back
<?php namespace App\Http\Controllers; use App\Http\Requests\BenefitRequest; use App\Http\Services\BenefitService; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; class BenefitController extends Controller { private BenefitService $service; public function __construct() { $this->service = new BenefitService(); } public function index(): JsonResponse { $response = $this->service->index(); return response()->json($response->data, $response->code); } public function store(Request $request): JsonResponse { $response = $this->service->store($request); return response()->json($response->data, $response->code); } public function show(string $id): JsonResponse { $response = $this->service->show($id); return response()->json($response->data, $response->code); } public function update(Request $request, string $id): JsonResponse { $response = $this->service->update($request, $id); return response()->json($response->data, $response->code); } public function destroy(string $id): JsonResponse { $response = $this->service->destroy($id); return response()->json($response->data, $response->code); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings