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条回答 默认 最新

    报告相同问题?