Activate links of Laravel Blade based on current route name
Consider a navigation menu with a bunch of links and you are trying to activate them based on the current active route name. In a normal case, you have to return the currentRouteName() from the controller or maybe in a view composer or any other place. I have written a simple Laravel composer package that makes it a little bit simpler. You can take a look at it here: https://github.com/hamidhaghdoost/active. For installation, use the composer require command like this: ...