如何在 Lumen 中执行 {{ asset('/css/app.css') }} ? [英] How to do {{ asset('/css/app.css') }} in Lumen?

查看:42
本文介绍了如何在 Lumen 中执行 {{ asset('/css/app.css') }} ?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Lumen 中,我可以在我的刀片模板中执行此操作:

In Lumen, I can do this in my blade template:

{{ url('/css/app.css') }}

在 Laravel 中我可以做到

In Laravel I could do

{{ asset('/css/app.css') }}

我在 Lumen 中只需要使用 url 助手吗?

Is the url helper all I have to work with in Lumen?

推荐答案

看看 Lumen UrlGenerator 源代码,Lumen 框架只支持 urlroute 助手.当然,如果需要,您可以编写 asset 助手.

Have look at Lumen UrlGenerator source code, the Lumen framework supports just url and route helpers. Of course, you can write the asset helper if you want.

这篇关于如何在 Lumen 中执行 {{ asset('/css/app.css') }} ?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆