Skip to content

Commit

Permalink
Fix column position
Browse files Browse the repository at this point in the history
  • Loading branch information
sohelamin committed Mar 26, 2019
1 parent 49c2ac5 commit 5156354
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RoutesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function getRoutes()
foreach ($routeCollection as $route) {
$controller = $this->getController($route['action']);
// Show class name without namesapce
if ($this->option('compact'))
if ($this->option('compact') && $controller !== 'None')
$controller = substr($controller, strrpos($controller, '\\') + 1);

$rows[] = [
Expand Down Expand Up @@ -174,14 +174,14 @@ protected function getHeaders()
*/
protected function getColumns()
{
$availableColumns = array_map('strtolower', $this->headers);
$availableColumns = array_map('lcfirst', $this->headers);

if ($this->option('compact')) {
return array_intersect($availableColumns, $this->compactColumns);
}

if ($columns = $this->option('columns')) {
return array_intersect($availableColumns, array_map('strtolower', $columns));
return array_intersect($availableColumns, array_map('lcfirst', $columns));
}

return $availableColumns;
Expand Down

0 comments on commit 5156354

Please sign in to comment.