<?php

namespace App\Http\Controllers\API\Agencies;

use App\Http\Controllers\Controller;
use App\Http\Traits\ResponseTrait;
use App\Repositries\AgencyRepository;
use Illuminate\Http\Request;

class AgencyController extends Controller
{
    use ResponseTrait;
    public $agencyRepository;
    public function __construct(AgencyRepository $agencyRepository)
    {
        $this->agencyRepository = $agencyRepository;
    }

    public function __invoke(Request $request)
    {
        return $this->response(data: $this->agencyRepository->index());
    }
}
