doudai8083 2017-10-06 04:20
浏览 72

使用laravel 5. * project- localhost和server的最佳实践是什么

Scenario 1

I develop laravel app in local host. And whenever i upload it to server i have to change index.php and public folder. This seems weird! In localhost i use public_path() for image upload but after uploading to server i have to change it to base_path()! This also seems weird too! If i have so many file where i use the public_path() function, then ? Here xampp is not mendatory to run but "php artisan serve"

Scenario 2

Recently i learned virtual host in localhost. In this scenario i have to run my app from htdocs folder and using xampp running. here i have to change laravel original structure like: index.php from public folder and all file from public folder have to move out to main path. In this scenario i have to do nothing after uploading to server. But here a problem: to all other project in htdocs i have to mention in host file and httpd-vhosts.conf file.

Now i want to know which one is best and you follow. Or any other procedure you follow to maintain your laravel 5.* project?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 matlab有关常微分方程的问题求解决
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考