Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120833472
AliasesCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
788 B
Referenced Files
None
Subscribers
None
AliasesCommand.php
View Options
<?php
namespace
App\Console\Commands\User
;
use
App\Console\Command
;
class
AliasesCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'user:aliases {user}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
"List a user's aliases"
;
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$user
=
$this
->
getUser
(
$this
->
argument
(
'user'
));
if
(!
$user
)
{
$this
->
error
(
"User not found."
);
return
1
;
}
foreach
(
$user
->
aliases
()->
pluck
(
'alias'
)->
all
()
as
$alias
)
{
$this
->
info
(
$alias
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 12:48 PM (1 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cd/4a/93287e06715cab6897baec4c938c
Default Alt Text
AliasesCommand.php (788 B)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline