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