Example #1
0
 /**
  * @return null
  */
 public function __invoke()
 {
     $table = [];
     foreach ($this->router->getRoutes() as $item) {
         $table[] = ['Path' => $item->getPath(), 'Name' => $item->getName(), 'Namespace' => $item->getNamespace(), 'Methods' => implode('|', $item->getAllowedMethods()), 'Middlewares' => $this->router->getMiddlewares($item->getName()) ? implode(', ', $this->router->getMiddlewares($item->getName())) : 'No middlewares'];
     }
     $this->climate->out('');
     $this->climate->yellow('Routes');
     $this->climate->yellowTable($table);
     $this->climate->out('');
 }