src/Active.php
public function checkRoute($routeNames)
    {
        if (!$this->route) {
            return false;
        }

        $routeName = $this->route->getName();

        if (in_array($routeName, (array)$routeNames)) {
            return true;
        }

        return false;
    }
public function checkRoute($routeNames)
    {
        if (!$this->route) {
            return false;
        }

        $routeName = $this->route->getName();

        if (in_array($routeName, (array)$routeNames)) {
            return true;
        }

        return false;
    }
public function checkRoute ( $ routeNames ) { if ( ! $ this -> route ) { return false ; } $ routeName = $ this -> route -> getName ( ) ; if ( in_array ( $ routeName , ( array ) $ routeNames ) ) { return true ; } return false ; }
Check if the name of the current route matches one of specific values

@param array|string $routeNames

@return bool
Check if the name of the current route matches one of specific values