Skip to content

Instantly share code, notes, and snippets.

@wayanjimmy
Last active June 7, 2016 12:39
Show Gist options
  • Save wayanjimmy/c9b8b3b48e7fdba792085fa259eb1c41 to your computer and use it in GitHub Desktop.
Save wayanjimmy/c9b8b3b48e7fdba792085fa259eb1c41 to your computer and use it in GitHub Desktop.
Override RouteListCommand
<?php
namespace App\Console\Commands\Route;
use Illuminate\Console\Command;
use Illuminate\Foundation\Console\RouteListCommand;
use Illuminate\Routing\Router;
class BackendRouteListCommand extends RouteListCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $name = 'route:list:backend';
/**
* The console command description.
*
* @var string
*/
protected $description = 'List all registered backend routes';
/**
* Execute the console command.
*
* @return mixed
*/
public function fire()
{
$this->routes = $this->router->getRoutes();
parent::fire();
}
}
@ardani
Copy link

ardani commented Jun 7, 2016

ganti sama ini gan protected $name = 'route:list:backend';

@wayanjimmy
Copy link
Author

makasi mas @ardani, asik dah bisa nih karang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment