public function isAlternate(LaravelRoute $route) { if (!$route instanceof Route) { return false; } // Validate methods if ($this->methods() != $route->methods()) { return false; } // Validate scheme if ($this->httpOnly() !== $route->httpOnly()) { return false; } // Validate base uri if ($this->getBaseUri() !== $route->getBaseUri()) { return false; } if ($this->getUri() === $route->getUri()) { return false; } return true; }