Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/MollieInfo.php
<?php | <?php | ||||
namespace App\Console\Commands; | namespace App\Console\Commands; | ||||
use App\Console\Command; | |||||
use App\User; | use App\User; | ||||
use Illuminate\Console\Command; | |||||
class MollieInfo extends Command | class MollieInfo extends Command | ||||
{ | { | ||||
/** | /** | ||||
* The name and signature of the console command. | * The name and signature of the console command. | ||||
* | * | ||||
* @var string | * @var string | ||||
*/ | */ | ||||
Show All 9 Lines | class MollieInfo extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
if ($this->argument('user')) { | if ($this->argument('user')) { | ||||
$user = User::where('email', $this->argument('user'))->first(); | $user = $this->getUser($this->argument('user')); | ||||
if (!$user) { | if (!$user) { | ||||
return 1; | return 1; | ||||
} | } | ||||
$this->info("Found user: {$user->id}"); | $this->info("Found user: {$user->id}"); | ||||
$wallet = $user->wallets->first(); | $wallet = $user->wallets->first(); | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |