Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/Job/WalletCheck.php
<?php | <?php | ||||
namespace App\Console\Commands\Job; | namespace App\Console\Commands\Job; | ||||
use App\Console\Command; | |||||
use App\Wallet; | use App\Wallet; | ||||
use Illuminate\Console\Command; | |||||
class WalletCheck extends Command | class WalletCheck extends Command | ||||
{ | { | ||||
/** | /** | ||||
* The name and signature of the console command. | * The name and signature of the console command. | ||||
* | * | ||||
* @var string | * @var string | ||||
*/ | */ | ||||
Show All 11 Lines | class WalletCheck extends 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) { | ||||
$this->error("Wallet not found"); | |||||
return 1; | return 1; | ||||
} | } | ||||
$job = new \App\Jobs\WalletCheck($wallet); | $job = new \App\Jobs\WalletCheck($wallet); | ||||
$job->handle(); | $job->handle(); | ||||
} | } | ||||
} | } |