Laravel学习日记-配置相关
in LaravelPHP with 0 comment

Laravel学习日记-配置相关

in LaravelPHP with 0 comment

配置相关

设置通过config方法

$value = config('app.timezone');
若要在运行期间修改设置值,请传递一个数组至 config 辅助函数:
config(['app.timezone' => 'America/Chicago']);

更改项目名称

php artisan app:name BLOG

维护模式

如果应用程序处于维护模式,则 HttpException 会抛出 503 的状态码。
启用维护模式:php artisan down
关闭维护模式:php artisan

维护模式的响应模板

resources/views/errors/503.blade.php
Responses
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif