laravel symlink is changed when code is pushed to live site

大兔子大兔子 提交于 2019-12-06 12:46:52

As your symlink points to another location within the project directory structure, you can safely use relative path for link, instead of having absolute one (which is what artisan is setting up). That would require manual linking though (remove current link if you have it in app/public already):

cd app/public
ln -s ../storage/app/public storage

You might consider setting up a post-receive hook in the target Git repo (the one you are pushing to). See this one for instance.

In that hook, you can add any step you need (like fixing the symlink).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!