File manager - Edit - /var/www/html/ciosp/api/app/Http/Controllers/TrafficNotificationController.php
Back
<?php namespace App\Http\Controllers; use App\Http\Requests\TrafficNotificationRequest; use App\Http\Services\TrafficNotificationService; use App\Models\TrafficNotification; use Illuminate\Support\Facades\Validator; class TrafficNotificationController extends Controller { private TrafficNotificationService $trafficNotificationService; public function __construct() { $this->trafficNotificationService = new TrafficNotificationService; } public function index() { $response = $this->trafficNotificationService->index(); return response()->json($response->data, $response->code); } public function store(TrafficNotificationRequest $request) { $response = $this->trafficNotificationService->store($request); return response()->json($response->data, $response->code); } public function show(TrafficNotification $trafficNotification) { $response = $this->trafficNotificationService->show($trafficNotification); return response()->json($response->data, $response->code); } public function update(TrafficNotificationRequest $request, TrafficNotification $trafficNotification) { $response = $this->trafficNotificationService->update($request, $trafficNotification); return response()->json($response->data, $response->code); } public function destroy(TrafficNotification $trafficNotification) { $response = $this->trafficNotificationService->destroy($trafficNotification); return response()->json($response->data, $response->code); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings