We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5601f76 commit 8c479e6Copy full SHA for 8c479e6
readme.md
@@ -88,6 +88,10 @@ class UserTypeGenerator extends GeneratorAbstract
88
Now when you use the `{{$generate_route_to_classes()}}` line in a view template, you will
89
see the class "user-admin" - neat!
90
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
95
### Ad-Hoc Class Additions
96
97
You can interact with the body classes directly by calling the `addClass` method on the
src/Generators/FullRoutePath.php
@@ -27,6 +27,7 @@ public function generateClassName()
27
{
28
$path = $this->getRoute()->getPath();
29
30
+ // Return early if no route path exists (such as viewing homepage/index)
31
if ('/' === $path) {
32
return null;
33
}
0 commit comments