是否可以将$path
变量传递给Blade表达式:
@if(Request::url() === 'http://project2.test/{{$path}}')
或
@if (Request::path() == '/{{$path}}')
答案 0 :(得分:0)
您必须使用简单的PHP串联
@if(Request::url() === 'http://project2.test/'.$path )
和
@if (Request::path() == '/' . $path )