<i id='xN7KA'><tr id='xN7KA'><dt id='xN7KA'><q id='xN7KA'><span id='xN7KA'><b id='xN7KA'><form id='xN7KA'><ins id='xN7KA'></ins><ul id='xN7KA'></ul><sub id='xN7KA'></sub></form><legend id='xN7KA'></legend><bdo id='xN7KA'><pre id='xN7KA'><center id='xN7KA'></center></pre></bdo></b><th id='xN7KA'></th></span></q></dt></tr></i><div id='xN7KA'><tfoot id='xN7KA'></tfoot><dl id='xN7KA'><fieldset id='xN7KA'></fieldset></dl></div>

<small id='xN7KA'></small><noframes id='xN7KA'>

  • <tfoot id='xN7KA'></tfoot>

        <bdo id='xN7KA'></bdo><ul id='xN7KA'></ul>
      <legend id='xN7KA'><style id='xN7KA'><dir id='xN7KA'><q id='xN7KA'></q></dir></style></legend>

        Laravel 4.2 说我的应用程序正在生产中.我该如何关闭它?

        Laravel 4.2 says my application is in production. How do I turn this off?(Laravel 4.2 说我的应用程序正在生产中.我该如何关闭它?)

          • <small id='g8R33'></small><noframes id='g8R33'>

            <tfoot id='g8R33'></tfoot>
                • <bdo id='g8R33'></bdo><ul id='g8R33'></ul>
                  <i id='g8R33'><tr id='g8R33'><dt id='g8R33'><q id='g8R33'><span id='g8R33'><b id='g8R33'><form id='g8R33'><ins id='g8R33'></ins><ul id='g8R33'></ul><sub id='g8R33'></sub></form><legend id='g8R33'></legend><bdo id='g8R33'><pre id='g8R33'><center id='g8R33'></center></pre></bdo></b><th id='g8R33'></th></span></q></dt></tr></i><div id='g8R33'><tfoot id='g8R33'></tfoot><dl id='g8R33'><fieldset id='g8R33'></fieldset></dl></div>

                  <legend id='g8R33'><style id='g8R33'><dir id='g8R33'><q id='g8R33'></q></dir></style></legend>
                    <tbody id='g8R33'></tbody>

                  本文介绍了Laravel 4.2 说我的应用程序正在生产中.我该如何关闭它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我全新安装了 Laravel.运行 php artisan migrate:refresh 时,我收到一条消息说 Application In Production!你真的要运行这个命令吗?'

                  I have a fresh install of Laravel. When running php artisan migrate:refresh I get a message saying Application In Production! Do you really wish to run this command?'

                  我知道这是 4.2 的更新,但我不知道如何关闭它.

                  I know this is an update in 4.2, however I can't figure out how to turn it off.

                  我在源代码中发现它来自 IlluminateConsoleConfirmableTrait 并在测试通过时运行:if ($this->getLaravel()->environment() == '生产')

                  I found in the source that it comes from IlluminateConsoleConfirmableTrait and runs if this if test passes : if ($this->getLaravel()->environment() == 'production')

                  我不确定为什么它认为我在生产中.我从不设置任何环境.这是我目前仍在使用的默认环境检测.

                  I'm not sure why it thinks I'm in production. I never setup any environments. This is the default environment detection, which I'm still currently using.

                  $env = $app->detectEnvironment(array(
                  
                      'local' => array('homestead')
                  
                  ));
                  

                  另外,如果我将生产环境设置为不是我的机器的主机名,我仍然会遇到同样的问题.

                  Also, if I set a production environment to a hostname that isn't my machine, I still have the same problem.

                  推荐答案

                  只要指定匹配给定环境的主机名,laravel会自动检测环境(默认为生产),例如:

                  Just specify a machine name for the host that matches a given environment, then laravel will automatically detect the environment (default is production), for example:

                  $env = $app->detectEnvironment(array(
                  
                      //'local' => array('homestead'),
                  
                      'local' => array('*.dev', gethostname()),
                      'production' => array('*.com', '*.net', 'www.somedomain.com')
                  ));
                  

                  阅读文档 和 这个答案也是如此.

                  这篇关于Laravel 4.2 说我的应用程序正在生产中.我该如何关闭它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Laravel 4 - Connect to other database(Laravel 4 - 连接到其他数据库)
                  Call external API function from controller, LARAVEL 4(从控制器调用外部 API 函数,LARAVEL 4)
                  Empty string instead of null values Eloquent(空字符串而不是空值 Eloquent)
                  quot;laravel.logquot; could not be opened: failed to open stream(“laravel.log无法打开:无法打开流)
                  Displaying the Error Messages in Laravel after being Redirected from controller(从控制器重定向后在 Laravel 中显示错误消息)
                  Laravel Creating Dynamic Routes to controllers from Mysql database(Laravel 从 Mysql 数据库创建到控制器的动态路由)

                        <i id='cbTz2'><tr id='cbTz2'><dt id='cbTz2'><q id='cbTz2'><span id='cbTz2'><b id='cbTz2'><form id='cbTz2'><ins id='cbTz2'></ins><ul id='cbTz2'></ul><sub id='cbTz2'></sub></form><legend id='cbTz2'></legend><bdo id='cbTz2'><pre id='cbTz2'><center id='cbTz2'></center></pre></bdo></b><th id='cbTz2'></th></span></q></dt></tr></i><div id='cbTz2'><tfoot id='cbTz2'></tfoot><dl id='cbTz2'><fieldset id='cbTz2'></fieldset></dl></div>
                          <bdo id='cbTz2'></bdo><ul id='cbTz2'></ul>

                            <tfoot id='cbTz2'></tfoot>

                            <small id='cbTz2'></small><noframes id='cbTz2'>

                              <tbody id='cbTz2'></tbody>

                            <legend id='cbTz2'><style id='cbTz2'><dir id='cbTz2'><q id='cbTz2'></q></dir></style></legend>