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