<?php

namespace App\Classes\Modules\PackingLists\Services;

use App\Models\Order;

class ChecksIfPackingListReferenceNumberExists
{

    private $repository;

    public function __construct(Order $repository)
    {
        $this->repository = $repository;
    }

    public function execute(string $reference_number): bool {
        return $this->repository->where('reference', $reference_number)->exists();
    }

}