Laravel 4.2 says my application is in production. How do I turn this off?

前端 未结 4 1617
深忆病人
深忆病人 2020-12-05 18:33

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

4条回答
  •  借酒劲吻你
    2020-12-05 18:48

    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')
    ));
    

    Read the documentation and this answer as well.

提交回复
热议问题