" Request :: is()"在刀片中的laravel 5.5上不起作用 [英] "Request::is()" not working on laravel 5.5, in blade
本文介绍了" Request :: is()"在刀片中的laravel 5.5上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在活动菜单上设置活动类.过去,我为此使用 Request :: is()函数,但是在新版本的laravel中,它显示找不到类'Request'." >
I am trying to set active classes on active menus. In the past I was using Request::is() function for this, but in the new version of laravel it says "Class 'Request' not found."
推荐答案
As you are using blade
you can use request
helper method. Try like this
request()->is('your_url');
这篇关于" Request :: is()"在刀片中的laravel 5.5上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文