Home  >  Article  >  php教程  >  laravel 代码维护, 使用php artisan使用应用程序处于维护状态

laravel 代码维护, 使用php artisan使用应用程序处于维护状态

WBOY
WBOYOriginal
2016-06-13 09:32:30827browse

当应用程序处于维护的时候,我们可以暂时关闭程序,具体的做使用是使用
php artisan down
artisan 是laravel根目录下的一个程序,当执行了这个命令时,会调用 app/start/global.php文件中的App::down函数
当维护完成扣,使用php artisan up来启用应用程序
App::down(function()
{
return Response::make("Be right back!", 503);
});

还可以使用php artisan 来生成32应用程序的key,在/app/config/app.php 中
命令是:php artisan key:generate
如果key已经设置,那么先清空一下就可以了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn