Page MenuHomePhorge

UserDomains.php
No OneTemporary

Authored By
Unknown
Size
977 B
Referenced Files
None
Subscribers
None

UserDomains.php

<?php
namespace App\Console\Commands;
use App\Domain;
use App\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class UserDomains extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:domains {userid}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = User::where('email', $this->argument('userid'))->first();
if (!$user) {
return 1;
}
foreach ($user->domains() as $domain) {
$this->info("{$domain->namespace}");
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 10:20 AM (2 h, 42 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18830451
Default Alt Text
UserDomains.php (977 B)

Event Timeline