瀏覽代碼

Make generated sidenav links readable

Vijayakrishnan Krishnan 5 年之前
父節點
當前提交
93d15f6a02
共有 1 個文件被更改,包括 6 次插入5 次删除
  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;