Changing default environment in Laravel 4

前端 未结 6 1888
我在风中等你
我在风中等你 2021-02-02 00:35

In Laravel 4 the default configuration environment is \'production\'. This means that if you run an artisan command without the --env option, it assumes the product

6条回答
  •  天命终不由人
    2021-02-02 01:24

    One of the most elegant solution that I've found is from this blog post: http://stevegrunwell.com/blog/laravel-application-environment/

    The advantages:

    1. No need to hardcode an array of development machines into a git committed file start.php.
    2. Fallback to server environmental variables in production.
    3. Easy persist local development environment by modifying the environment.php file.

提交回复
热议问题