File manager - Edit - /var/www/html/spdc/api/app/Http/Controllers/MaritalStatusController.php
Back
<?php namespace App\Http\Controllers; use App\Http\Requests\MaritalStatusRequest; use App\Http\Services\MaritalStatusService; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; class MaritalStatusController extends Controller { private MaritalStatusService $service; public function __construct() { $this->service = new MaritalStatusService(); } /** * @OA\Get( * path="/api/marital-status", * summary="Get all marital status", * operationId="GetAllMaritalStatus", * security={{"bearerAuth":{}}}, * tags={"Marital Status"}, * @OA\Response( * response="200", * description="OK", * @OA\JsonContent( * @OA\Property(property="data", type="json", example="{}"), * @OA\Property(property="message", type="string", example="Success."), * ) * ) * ) */ 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->delete($id); return response()->json($response->data, $response->code); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings