Page MenuHomePhorge

SetStatusCommand.php
No OneTemporary

Authored By
Unknown
Size
868 B
Referenced Files
None
Subscribers
None

SetStatusCommand.php

<?php
namespace App\Console\Commands\Domain;
use App\Console\Command;
class SetStatusCommand 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 = $this->getDomain($this->argument('domain'));
if (!$domain) {
$this->error("Domain not found.");
return 1;
}
$domain->status = (int) $this->argument('status');
$domain->save();
$this->info("Status ({$domain->status}): " . $domain->statusText());
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Apr 4, 9:49 AM (3 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ad/cf/c9f96c1c31251da5d82d33dc5604
Default Alt Text
SetStatusCommand.php (868 B)

Event Timeline