mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
28 lines
505 B
PHP
28 lines
505 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Orders\Services;
|
|
|
|
|
|
use App\Models\Order;
|
|
|
|
class ChecksIfOrderNumberExists
|
|
{
|
|
|
|
/** @var Order */
|
|
private $repository;
|
|
|
|
|
|
/**
|
|
* ChecksIfBookingMarkingExists constructor.
|
|
* @param Order $repository
|
|
*/
|
|
public function __construct(Order $repository)
|
|
{
|
|
$this->repository = $repository;
|
|
}
|
|
|
|
public function execute(int $orderNumber): bool {
|
|
return $this->repository->where('reference', $orderNumber)->exists();
|
|
}
|
|
|
|
} |