Page MenuHomePhorge

AliasesCommand.php
No OneTemporary

Authored By
Unknown
Size
788 B
Referenced Files
None
Subscribers
None

AliasesCommand.php

<?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

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)

Event Timeline