RouteListCommand
Extends
Properties
$name string
The console command name.
$description string
The console command description.
$headers string[]
The table headers for the command.
$terminalWidthResolver Closure |null
The terminal width resolver callback.
$verbColors array
The verb colors for the command.
Methods
__construct ( Router $router ) : void
Create a new route command instance.
Parameters
- $router Router
handle ( ) : void
Execute the console command.
getRoutes ( ) : array
Compile the routes into a displayable format.
getRouteInformation ( Route $route ) : array
Get the route information for a given route.
Parameters
- $route Route
sortRoutes ( $sort , array $routes ) : array
Sort the routes by a given element.
Parameters
- $sort string
- $routes array
pluckColumns ( array $routes ) : array
Remove unnecessary columns from the routes.
Parameters
- $routes array
displayRoutes ( array $routes ) : void
Display the route information on the console.
Parameters
- $routes array
getMiddleware ( $route ) : string
Get the middleware for the route.
Parameters
- $route Route
isVendorRoute ( Route $route ) : bool
Determine if the route has been defined outside of the application.
Parameters
- $route Route
isFrameworkController ( Route $route ) : bool
Determine if the route uses a framework controller.
Parameters
- $route Route
filterRoute ( array $route ) : array|null
Filter the route by URI and / or name.
Parameters
- $route array
getHeaders ( ) : array
Get the table headers for the visible columns.
getColumns ( ) : array
Get the column names to show (lowercase table headers).
parseColumns ( array $columns ) : array
Parse the column list.
Parameters
- $columns array
asJson ( $routes ) : string
Convert the given routes to JSON.
Parameters
- $routes Illuminate\...\Collection
forCli ( $routes ) : array
Convert the given routes to regular CLI output.
Parameters
- $routes Illuminate\...\Collection
formatActionForCli ( $route ) : string
Get the formatted action for display on the CLI.
Parameters
- $route array
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
getTerminalWidth ( ) : int
Get the terminal width.
resolveTerminalWidthUsing ( $resolver ) : void
Set a callback that should be used when resolving the terminal width.
Parameters
- $resolver Closure |null
getOptions ( ) : array
Get the console command options.