Page MenuHomePhorge

DomainSetStatus.php
No OneTemporary

Size
901 B
Referenced Files
None
Subscribers
None

DomainSetStatus.php

<?php
namespace App\Console\Commands;
use App\Domain;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Queue;
class DomainSetStatus extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'domain:set-status {domain} {status}';
/**
* The console command description.
*
* @var string
*/
protected $description = "Set a domain's status.";
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$domain = Domain::where('namespace', $this->argument('domain'))->first();
if (!$domain) {
return 1;
}
Queue::fake(); // ignore LDAP for now
$domain->status = (int) $this->argument('status');
$domain->save();
$this->info($domain->status);
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Oct 20, 12:20 AM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1548787
Default Alt Text
DomainSetStatus.php (901 B)

Event Timeline