<?php

namespace App\Classes\Modules\Companies\Services;

use App\Models\Company;
use App\Http\Resources\Company as CompanyResource;

class ProfilesCompany
{
    /** @var  Company */
    private $repository;

    /**
     * ProfilesCompany constructor.
     * @param Company $repository
     */
    public function __construct(Company $repository)
    {
        $this->repository = $repository;
    }


    public function execute(string $id){

        $company = $this->repository->findOrFail($id);

        return new CompanyResource($company);
    }

}