<?php
namespace App\Http\Controllers\Owner\GroupProviderReview;

use App\Http\Controllers\Controller;

use App\Http\Helpers\ResponseBuilder;
use App\Modules\GroupProviderReview\Application\GroupProviderReviewIndexer;
use App\Modules\GroupProviderReview\Domain\IdGroupProviderReview;
use App\Modules\GroupProviderReview\Infraestructure\MysqlGroupProviderReviewRepository;

class GroupProviderReviewIndexController extends Controller
{
    public function __construct()
    {
    }

    public function __invoke($Id)
    {
        $response = (new GroupProviderReviewIndexer(new MysqlGroupProviderReviewRepository()))
            ->__invoke(new IdGroupProviderReview($Id));

        return ResponseBuilder::Response($response);
    }
}
