<?php

namespace Modules\Catalog\Http\Controllers;

use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Routing\Controller;
use Modules\Catalog\Http\Resources\DestinationResource;
use Modules\Catalog\Models\Destination;

class DestinationController extends Controller
{
    public function index(): AnonymousResourceCollection
    {
        return DestinationResource::collection(
            Destination::query()->where('is_active', true)->get()
        );
    }
}
