Files
exchange-2.0/app/Classes/Modules/Transactions/Services/ChecksIfTransactionBillNumberExists.php
T
omair saleh 05401f6bbc large commit
2021-03-11 13:06:40 +08:00

22 lines
406 B
PHP

<?php
namespace App\Classes\Modules\Transactions\Services;
use App\Models\Transaction;
class ChecksIfTransactionBillNumberExists
{
private $repository;
public function __construct(Transaction $repository)
{
$this->repository = $repository;
}
public function execute(string $bill_no): bool {
return $this->repository->where('bill_no', $bill_no)->exists();
}
}