<?php

namespace App\Classes\Modules\Warehouses\Services;

use App\Models\Warehouse;
use App\Http\Resources\Warehouse as WarehouseResource;

class ProfilesWarehouse
{
    /** @var  Warehouse */
    private $repository;

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

    public function execute(String $id){

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

        return new WarehouseResource($warehouse);

    }

}