<?php

namespace Modules\Catalog\Http\Controllers;

use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Routing\Controller;
use Modules\Catalog\Http\Resources\EvCompanyResource;
use Modules\Catalog\Models\EvCompany;

class EvCompanyController extends Controller
{
    public function index(): AnonymousResourceCollection
    {
        return EvCompanyResource::collection(
            EvCompany::query()->where('is_active', true)->paginate()
        );
    }
}
