Laravel 8 访问当前路由
您可以使用 Route 门面的 current, currentRouteName 和 currentRouteAction 方法处理传入的请求路由访问信息:
$route = Route::current();
$name = Route::currentRouteName();
$action = Route::currentRouteAction();
有关 Route 门面 和 Route 实例 的基础类的信息,请参阅 API 文档,以查看所有可访问的方法。