protected function isRouteNameExists($name)
    {
        $existingRoutes = Route::getRoutes();

        foreach ($existingRoutes as $existingRoute) {
            if ($existingRoute->getName() == $name) {
                return true;
            }
        }

        return false;
    }
protected function isRouteNameExists($name)
    {
        $existingRoutes = Route::getRoutes();

        foreach ($existingRoutes as $existingRoute) {
            if ($existingRoute->getName() == $name) {
                return true;
            }
        }

        return false;
    }
protected function isRouteNameExists ( $ name ) { $ existingRoutes = Route :: getRoutes ( ) ; foreach ( $ existingRoutes as $ existingRoute ) { if ( $ existingRoute -> getName ( ) == $ name ) { return true ; } } return false ; }
Checks if a route name is already registred.

@param string $name

@return  bool
Checks if a route name is already registred .