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