wyh_
2017-09-17 01:50
在左侧栏链接的状态显示中
使用Request::getPathInfo()=="url"?"active":“”
会提示Non-static method cant called statically
这要如何处理?
查询过百度,通过应用(new \Illuminate\Http\Request())->getPathInfo()
不会报错,但却无效果
request()->path()=='student/index'?'active':''}}">完美解决问题
request()->getPathInfo() 用这个代替试试看
轻松学会Laravel-表单篇
32700 学习 · 276 问题
相似问题