Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/Job/WalletCheck.php
Show All 24 Lines | class WalletCheck extends Command | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$wallet = Wallet::find($this->argument('wallet')); | $wallet = Wallet::find($this->argument('wallet')); | ||||
if (!$wallet) { | if (!$wallet || !$wallet->owner()->withTrashed()->withEnvTenant()->first()) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$job = new \App\Jobs\WalletCheck($wallet); | $job = new \App\Jobs\WalletCheck($wallet); | ||||
$job->handle(); | $job->handle(); | ||||
} | } | ||||
} | } |