Easily highlight your navbar menus

Use Route::is('route-name') to easily highlight your navbar menus

1<ul>
2 <li @if(Route::is('home')) class="active" @endif>
3 <a href="/">Home</a>
4 </li>
5 <li @if(Route::is('contact-us')) class="active" @endif>
6 <a href="/contact-us">Contact us</a>
7 </li>
8</ul>

Tip given by @anwar_nairi

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord