I assume you want to check if a there's a route matching a certain URL.
$routes = Route::getRoutes();
$request = Request::create('the/url/you/want/to/check');
try {
$routes->match($request);
// route exists
}
catch (SymfonyComponentHttpKernelExceptionNotFoundHttpException $e){
// route doesn't exist
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…