Level 122
You can change the name blogdetail to blog.detail and blog to blog.index then use blog.* in your is() functiom
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How to check the if the current route name is one of two predefined route names? Currently I have:
<a class={{ Route::is('blog') ? ' active' : '' }}{{ Route::is('blogdetail') ? ' active' : '' }}" href=#>MyLink</a>
Perhaps, there is some better routine/way of checking the current named route from a list of predefined routes?
You can change the name blogdetail to blog.detail and blog to blog.index then use blog.* in your is() functiom
Please or to participate in this conversation.