Skip to content

Commit 8c479e6

Browse files
committed
update docs
1 parent 5601f76 commit 8c479e6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class UserTypeGenerator extends GeneratorAbstract
8888
Now when you use the `{{$generate_route_to_classes()}}` line in a view template, you will
8989
see 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

9397
You can interact with the body classes directly by calling the `addClass` method on the

src/Generators/FullRoutePath.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)