【发布时间】:2018-04-03 10:46:15
【问题描述】:
为什么这不起作用?
<div class="bewinkel-img"
@if(!empty($content->category_id) && isset($website_category->category->group_url))
onclick='window.location = "{{URL::route(\"productv2.category\", $website_category->category->group_url.'/'.$website_category->category->complete_url) }}"'>
@elseif(!empty($content->category_group_id) && isset($website_category_group->url))
onclick='window.location = "{{URL::route("productv2.category", $website_category_group->url) }}"
@endif
<div style="@if($content->height != "") width:100%; height:{{$content->height}}px; @else height:300px; @endif background-image: url('{!!cdn_asset($content->img)!!}')">
</div>
</div>
错误信息如下:
Method Illuminate\View\View::__toString() 不能抛出异常,捕获 ErrorException: Parse error: syntax error, unexpected '"', expecting identifier (T_STRING)
感谢任何帮助!
【问题讨论】:
标签: laravel