简体   繁体   English

OpenShift上的Laravel 5.1资产(js,css,img)不起作用

[英]Laravel 5.1 Assets (js, css, img) on OpenShift don't work

I uploaded my Laravel 5.1 project to OpenShift and everything is ok. 我将Laravel 5.1项目上传到OpenShift,一切正常。 But when I tried working with css and js files using {{ asset() }} an error occurred and the changes are not displayed. 但是,当我尝试使用{{ asset() }}处理CSS和JS文件时,发生了错误,并且未显示更改。

Please help. 请帮忙。 Thanks. 谢谢。

<link type="text/css" rel="stylesheet" href="{{ asset('plugins/materialize/css/materialize.css') }}">
<link type="text/css" rel="stylesheet" href="{{ asset('css/estilo.css') }}">

example.jpg

error 错误

add / in your {{ asset('css/estilo.css') }} 在您的{{ asset('css/estilo.css') }}添加/

like this {{ asset('/css/estilo.css') }} 像这样{{ asset('/css/estilo.css') }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM