Explorar el Código

Make generated sidenav links readable

Vijayakrishnan Krishnan hace 5 años
padre
commit
93d15f6a02
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6 5
      app/Console/Commands/GenerateTreeCommand.php

+ 6 - 5
app/Console/Commands/GenerateTreeCommand.php

@@ -156,12 +156,13 @@ class GenerateTreeCommand extends Command
                             $currentSubType = '';
                             $currentSubController = new GenController();
 
-                            $sideLinks[] = "<li class='nav-item'><a href='/{$currentController->name}' " .
+                            $sideLinks[] = "<li class='nav-item'>\n" .
+                                "\t<a href='/{$currentController->name}' " .
                                 "class='nav-link " .
-                                "{{ (isset(request()->route()->getController()->selfName) && strpos(request()->route()->getController()->selfName, '{$currentController->name}') === 0 ? 'active' : '') }}" . " '>" .
-                                "<i class='nav-icon fa fa-$icon'></i>" .
-                                "<p>" . $currentController->snakeToTitleCase($currentController->name) . "</p>" .
-                                "</a></li>";
+                                "{{ (isset(request()->route()->getController()->selfName) && strpos(request()->route()->getController()->selfName, '{$currentController->name}') === 0 ? 'active' : '') }}" . " '>\n" .
+                                "\t\t<i class='nav-icon fa fa-$icon'></i>\n" .
+                                "\t\t<p>" . $currentController->snakeToTitleCase($currentController->name) . "</p>\n" .
+                                "\t</a>\n</li>\n";
                         }
                         break;