It was suggested在您的公用文件夹中更改index.php
。
*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});
现在你不需要改变你的公共路径时,您的公共 目录已经更改。
Elixir有一个硬编码的公共路径!不要忘记在Elixir配置中设置已更改的 公共路径。
我想补充一点,您还需要确保您的新公共路径与默认路径具有相同的权限。您可能还想更改config/filesystem.php
中的公共路径。
我使用asset()来包含来自js/css的源代码,然后全部消失。 我跟随此http://stackoverflow.com/a/29716810/5071013 和更改资产()elixir()仍然不工作 – GaoEy
哦,我有我的XAMMP pourblem但生产工作仍然可以谢谢:D – GaoEy