doumeng3345 2017-02-08 06:28
浏览 43
已采纳

Laravel刀片中打印的URL不正确

I have a blade file which has below reference

@include('Js/login')

In this above file, I have below code

<script>
    var processingImageUrl = '<img src="'+ "{!! URL('Images/ajax-loader.gif') !!}" + '" />'
</script>

When I checked the page source, it was like below.

var processingImageUrl = '<img src="' + "{!! URL('Images/ajax-loader.gif') !!}" + '" />'

I am trying to show the app path but due to some reasons it is being printed incorrectly.

Am I missing something?

  • 写回答

3条回答 默认 最新

  • drr7731 2017-02-08 06:59
    关注

    Looks like its not compiled. The file where your script is added, the file name should end with blade.php. Exmaple - testview.blade.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?