public removeRoute ( string $path ) : boolean | ||
$path | string | Route name |
return | boolean | Success |
public function removeRoute($path)
{
$routeName = ltrim($path, '/');
if (!isset($this->routes[$routeName])) {
return false;
}
unset($this->routes[$routeName]);
return true;
}