Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485265
SetStatusCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
914 B
Referenced Files
None
Subscribers
None
SetStatusCommand.php
View Options
<?php
namespace
App\Console\Commands\Domain
;
use
App\Console\Command
;
use
Illuminate\Support\Facades\Queue
;
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
;
}
Queue
::
fake
();
// ignore LDAP for now
$domain
->
status
=
(
int
)
$this
->
argument
(
'status'
);
$domain
->
save
();
$this
->
info
(
$domain
->
status
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 11:49 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387472
Default Alt Text
SetStatusCommand.php (914 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment