adrema/app/Prevention/Actions/SettingApiAction.php

20 lines
370 B
PHP
Raw Normal View History

2024-07-04 21:01:14 +02:00
<?php
namespace App\Prevention\Actions;
use App\Prevention\PreventionSettings;
use Illuminate\Http\JsonResponse;
use Lorisleiva\Actions\Concerns\AsAction;
class SettingApiAction
{
use AsAction;
public function handle(): JsonResponse
{
return response()->json([
'data' => app(PreventionSettings::class)->toArray(),
]);
}
}