upload my project laravel to a shared host

十年热恋 提交于 2019-12-06 11:59:59

I guess easiest and better approach in this situation will be creating of a symlink between public_html and public folders. Example for Ubuntu/Debian:

ln -s /path-to-pub/public_html /path-to-pub/public

This solution is better because when you'll decide to move your project to VPN, dedicated server etc., you will not need to remember about any modifications you made and rewrite any code.

Put this code:

$app->bind('path.public', function () {
    return base_path() . '/public_html';
});

to bootstrap/app.php and You are good to go. (I assuming that You renamed public directory already.)

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