File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ class UserTypeGenerator extends GeneratorAbstract
8888Now when you use the ` {{$generate_route_to_classes()}} ` line in a view template, you will
8989see the class "user-admin" - neat!
9090
91+ See this file for a real-life example:
92+
93+ https://github.com/zschuessler/laravel-route-to-class/blob/master/src/Generators/FullRoutePath.php
94+
9195### Ad-Hoc Class Additions
9296
9397You can interact with the body classes directly by calling the ` addClass ` method on the
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public function generateClassName()
2727 {
2828 $ path = $ this ->getRoute ()->getPath ();
2929
30+ // Return early if no route path exists (such as viewing homepage/index)
3031 if ('/ ' === $ path ) {
3132 return null ;
3233 }
You can’t perform that action at this time.
0 commit comments