简体   繁体   English

我如何在Laravel 4的公用文件夹之外使用CSS和JS

[英]how can I use css and js outside of public folder in Laravel 4

i am using laravel 4. Here my css and js are not in public folder. 我正在使用laravel4。在这里,我的css和js不在公共文件夹中。 I want to access them through another folder. 我想通过另一个文件夹访问它们。 I know that by default we can access css and js from public folder only in laravel. 我知道默认情况下,我们只能在laravel中从公共文件夹访问css和js。 Please help me on this to access from outside of public folder. 请帮助我从公用文件夹外部访问。

This shouldnt be made, it has a reason why the structure is like that. 这是不应该做的,它有一个这样的结构的原因。 The user can only see scripts in the public folder, that has the advantage that he can not execute scripts. 用户只能在公用文件夹中看到脚本,其优点是不能执行脚本。

If the css/js/img files come from a Laravel package try php artisan asset:publish [package] 如果css / js / img文件来自Laravel软件包,请尝试php artisan asset:publish [package]

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

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