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