Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在使用 Yii 时,我发现它确实提供了方便的方法来检索当前操作。该方法在 Laravel 中可用吗?
谢谢你。
利用
Request::route()->controller_action
返回当前请求的Request::route()路由对象。您将在此对象中找到路由详细信息。如果它不是控制器路由而是关闭路由,那么Request::route()->controller_action将为空。
Request::route()