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