当前位置: 首页>>代码示例>>PHP>>正文


PHP Command::askWithCompletion方法代码示例

本文整理汇总了PHP中Illuminate\Console\Command::askWithCompletion方法的典型用法代码示例。如果您正苦于以下问题:PHP Command::askWithCompletion方法的具体用法?PHP Command::askWithCompletion怎么用?PHP Command::askWithCompletion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Console\Command的用法示例。


在下文中一共展示了Command::askWithCompletion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handle

 /**
  * Handle the command.
  */
 public function handle()
 {
     $this->data->put('DB_DRIVER', $this->command->askWithCompletion('What database driver would you like to use? [mysql, pgsql, sqlite, sqlsrv]', ['mysql', 'pgsql', 'sqlite', 'sqlsrv'], env('DB_DRIVER', 'mysql')));
     $this->data->put('DB_HOST', $this->command->ask('What is the hostname of your database?', env('DB_HOST', 'localhost')));
     $this->data->put('DB_DATABASE', $this->command->ask('What is the name of your database?', env('DB_DATABASE')));
     $this->data->put('DB_USERNAME', $this->command->ask('Enter the username for your database connection', env('DB_USERNAME', 'root')));
     $this->data->put('DB_PASSWORD', $this->command->ask('Enter the password for your database connection', env('DB_PASSWORD')));
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:11,代码来源:SetDatabaseData.php

示例2: handle

 /**
  * Handle the command.
  *
  * @param Repository $config
  */
 public function handle(Repository $config)
 {
     $this->data->put('LOCALE', $this->command->askWithCompletion('Enter the default locale', array_keys($config->get('streams::locales.supported')), env('APPLICATION_LOCALE', 'en')));
     $this->data->put('TIMEZONE', $this->command->askWithCompletion('Enter the default timezone', timezone_identifiers_list(), env('APPLICATION_TIMEZONE', 'UTC')));
     return $this->data;
 }
开发者ID:huglester,项目名称:streams-platform,代码行数:11,代码来源:SetOtherData.php


注:本文中的Illuminate\Console\Command::askWithCompletion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。