update deploy

This commit is contained in:
bulut
2026-03-27 10:41:54 +03:00
parent 69d19c0176
commit 6f6448aa06
422 changed files with 37956 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Http\Controllers\Api\V1;
use App\Enums\SettingGroup;
use App\Http\Controllers\Controller;
use App\Repositories\Contracts\SettingRepositoryInterface;
use Illuminate\Http\JsonResponse;
use OpenApi\Attributes as OA;
class SettingController extends Controller
{
public function __construct(private SettingRepositoryInterface $repository) {}
/**
* Return all public settings grouped by group name.
*/
#[OA\Get(
path: '/api/v1/settings',
summary: 'Tüm site ayarlarını getir (group bazlı nested)',
tags: ['Settings'],
responses: [new OA\Response(response: 200, description: 'Ayarlar listesi')],
)]
public function index(): JsonResponse
{
return response()->json($this->repository->publicGrouped());
}
/**
* Return public settings for a single group.
*/
#[OA\Get(
path: '/api/v1/settings/{group}',
summary: 'Tek grup ayarlarını getir',
tags: ['Settings'],
parameters: [new OA\Parameter(name: 'group', in: 'path', required: true, schema: new OA\Schema(type: 'string'))],
responses: [
new OA\Response(response: 200, description: 'Grup ayarları'),
new OA\Response(response: 404, description: 'Grup bulunamadı'),
],
)]
public function show(string $group): JsonResponse
{
$settingGroup = SettingGroup::tryFrom($group);
if (! $settingGroup) {
abort(404, 'Ayar grubu bulunamadı.');
}
return response()->json($this->repository->publicByGroup($settingGroup));
}
}