<?php

namespace App\Http\Controllers\Api\Tenant;

use App\Http\Controllers\Controller;
use App\Http\Resources\Tenant\EventTypeResource;
use App\Models\EventType;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;

class EventTypeController extends Controller
{
    public function __invoke(): AnonymousResourceCollection
    {
        $eventTypes = EventType::query()
            ->orderBy('slug')
            ->get();

        return EventTypeResource::collection($eventTypes);
    }
}
