ViralTiger of Viralbamboo Application Developers
9/28/2017 - 10:38 AM

Watson Routing Active Helper

Active is a helper package for Laravel that makes it easy to recognize the current path or route, useful for adding 'active' classes (like those used in the Boostrap framework) and performing other actions only when a certain route is active. It also includes helpers for retrieving the current controller and action names.

// Ensure matches route passed to active() function.
<a href="{{ route('') }}" class="{{ active('','active-class') }}">All posts</a>