// Yes or no?if ($this->confirm('Do you wish to continue?')) {//}// Open question with auto-complete options$name =$this->anticipate('What is your name?', ['Taylor','Dayle']);// One of the listed options with default index$name =$this->choice('What is your name?', ['Taylor','Dayle'], $defaultIndex);
维护模式
如果你想要在页面上启用维护模式,执行下面的 Artisan 命令:
phpartisandown
然后人们会看到默认的 503 页面。 在 Laravel 8 里,你还可以提供的标识:
用户将会重定向的路径地址
预渲染的维护模式视图页面
绕过维护模式的秘钥
维护模式返回的状态吗
每 X 秒重新加载页面
php artisan down --redirect="/" --render="errors::503" --secret="1630542a-246b-4b66-afa1-dd72a4c43515" --status=200 --retry=60
Options:
-a, --all Generate a migration, seeder, factory, and resource controller for the model
-c, --controller Create a new controller for the model
-f, --factory Create a new factory for the model
--force Create the class even if the model already exists
-m, --migration Create a new migration file for the model
-s, --seed Create a new seeder file for the model
-p, --pivot Indicates if the generated model should be a custom intermediate table model
-r, --resource Indicates if the generated controller should be a resource controller
--api Indicates if the generated controller should be an API controller
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug