mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 12:34:18 +00:00
28 lines
486 B
PHP
28 lines
486 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Wallets\Services;
|
|
|
|
|
|
use App\Models\Wallet;
|
|
|
|
class ChecksIfWalletCodeExists
|
|
{
|
|
|
|
/** @var wallet */
|
|
private $repository;
|
|
|
|
|
|
/**
|
|
* ChecksIfWalletCodeExists constructor.
|
|
* @param Wallet $repository
|
|
*/
|
|
public function __construct(wallet $repository)
|
|
{
|
|
$this->repository = $repository;
|
|
}
|
|
|
|
public function execute(int $code): bool {
|
|
return $this->repository->where('code', $code)->exists();
|
|
}
|
|
|
|
} |