Changeset View
Changeset View
Standalone View
Standalone View
src/app/Console/Commands/Sku/ListUsers.php
Show All 21 Lines | class ListUsers extends Command | ||||
/** | /** | ||||
* Execute the console command. | * Execute the console command. | ||||
* | * | ||||
* @return mixed | * @return mixed | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$sku = \App\Sku::find($this->argument('sku')); | $sku = \App\Sku::withEnvTenant()->find($this->argument('sku')); | ||||
if (!$sku) { | if (!$sku) { | ||||
$sku = \App\Sku::where('title', $this->argument('sku'))->first(); | $sku = \App\Sku::where('title', $this->argument('sku'))->first(); | ||||
} | } | ||||
if (!$sku) { | if (!$sku) { | ||||
$this->error("Unable to find the SKU."); | $this->error("Unable to find the SKU."); | ||||
return 1; | return 1; | ||||
Show All 26 Lines |