class Illuminate / Foundation / Console / RouteListCommand
You are viewing an older version of the documentation. For the latest, please visit master documentation.

RouteListCommand

Extends

Properties

protected

$name string

The console command name.

Default: 'route:list'
protected

$description string

The console command description.

Default: 'List all registered routes'
protected

$router Router

The router instance.

Default: null
protected

$headers string[]

The table headers for the command.

Default: array
protected

$compactColumns string[]

The columns to display when using the "compact" flag.

Default: array

Methods

public

__construct ( Router $router ) : void

Create a new route command instance.

Parameters

public

handle ( ) : void

Execute the console command.

protected

getRoutes ( ) : array

Compile the routes into a displayable format.

protected

getRouteInformation ( Route $route ) : array

Get the route information for a given route.

Parameters

protected

sortRoutes ( $sort , array $routes ) : array

Sort the routes by a given element.

Parameters

  • $sort string
  • $routes array
protected

pluckColumns ( array $routes ) : array

Remove unnecessary columns from the routes.

Parameters

  • $routes array
protected

displayRoutes ( array $routes ) : void

Display the route information on the console.

Parameters

  • $routes array
protected

getMiddleware ( $route ) : string

Get the middleware for the route.

Parameters

protected

filterRoute ( array $route ) : array|null

Filter the route by URI and / or name.

Parameters

  • $route array
protected

getHeaders ( ) : array

Get the table headers for the visible columns.

protected

getColumns ( ) : array

Get the column names to show (lowercase table headers).

protected

parseColumns ( array $columns ) : array

Parse the column list.

Parameters

  • $columns array
protected

asJson ( array $routes ) : string

Convert the given routes to JSON.

Parameters

  • $routes array
protected

getOptions ( ) : array

Get the console command options.