class Illuminate / Foundation / Console / RouteListCommand

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 static

$terminalWidthResolver Closure |null

The terminal width resolver callback.

Default: null
protected

$verbColors array

The verb colors for the command.

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

isVendorRoute ( Route $route ) : bool

Determine if the route has been defined outside of the application.

Parameters

protected

isFrameworkController ( Route $route ) : bool

Determine if the route uses a framework controller.

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 ( $routes ) : string

Convert the given routes to JSON.

Parameters

  • $routes Illuminate\...\Collection
protected

forCli ( $routes ) : array

Convert the given routes to regular CLI output.

Parameters

  • $routes Illuminate\...\Collection
protected

formatActionForCli ( $route ) : string

Get the formatted action for display on the CLI.

Parameters

  • $route array
protected

determineRouteCountOutput ( $routes , $terminalWidth ) : string

Determine and return the output for displaying the number of routes in the CLI output.

Parameters

  • $routes Illuminate\...\Collection
  • $terminalWidth int
public static

getTerminalWidth ( ) : int

Get the terminal width.

public static

resolveTerminalWidthUsing ( $resolver ) : void

Set a callback that should be used when resolving the terminal width.

Parameters

protected

getOptions ( ) : array

Get the console command options.