laravel框架下获取路由的前缀信息
获取路由前缀
- in controller
$request->route()->getPrefix()
$this->getRouter()->getCurrentRoute()->getPrefix()
- in blade
Request::route()->getPrefix();
本文是原创文章,采用CC BY-NC-SA 4.0协议,完整转载请注明来自耕田日记
评论
$request->route()->getPrefix()
$this->getRouter()->getCurrentRoute()->getPrefix()
Request::route()->getPrefix();