function is_current_route($route)
 {
     if ($route instanceof Illuminate\Routing\Route) {
         $route = $route->getName();
     }
     return $route === current_route('name');
 }
Beispiel #2
0
function is_active($expect)
{
    if (current_route('class') == $expect) {
        return 'class="active"';
    }
}