Files
bogazici-api/app/Http/Controllers/Api/V1/GuideCardController.php
2026-03-27 10:41:54 +03:00

26 lines
787 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Resources\GuideCardResource;
use App\Repositories\Contracts\GuideCardRepositoryInterface;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use OpenApi\Attributes as OA;
class GuideCardController extends Controller
{
public function __construct(private GuideCardRepositoryInterface $repository) {}
#[OA\Get(
path: '/api/v1/guide-cards',
summary: 'Rehber kartlarını listele',
tags: ['Guide Cards'],
responses: [new OA\Response(response: 200, description: 'Rehber kart listesi')],
)]
public function index(): AnonymousResourceCollection
{
return GuideCardResource::collection($this->repository->active());
}
}