本文整理汇总了PHP中Illuminate\Console\Command::info方法的典型用法代码示例。如果您正苦于以下问题:PHP Command::info方法的具体用法?PHP Command::info怎么用?PHP Command::info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Console\Command
的用法示例。
在下文中一共展示了Command::info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate
/**
* Runs the generator.
*/
public function generate()
{
$this->createModulesDir();
$this->createFolders();
$this->createFiles();
$this->console->info("Your module [{$this->name}] has been generated.");
}
示例2: createFolder
/**
* Create the specified folder.
*
* @param $folder
* @param $success
* @param $error
*/
protected function createFolder($folder, $success, $error)
{
if (!is_dir($folder)) {
$this->files->makeDirectory($folder);
return $this->console->info($success);
}
return $this->console->comment($error);
}
示例3: handle
/**
* Handle the command.
*
* @param Markdown $markdown
*/
public function handle(Markdown $markdown)
{
$this->command->info(strip_tags($markdown->transform(file_get_contents(base_path('LICENSE.md')))));
if (!$this->command->confirm('Do you agree to the provided license and terms of service?')) {
$this->command->error('You must agree to the license and terms of service before continuing.');
exit;
}
}
示例4: handle
/**
* Handle the command.
*
* @param Filesystem $filesystem
* @param Application $application
* @return string
*/
public function handle(Filesystem $filesystem, Application $application)
{
$destination = $application->getResourcesPath('streams/lang');
if (is_dir($destination) && !$this->command->option('force')) {
return $this->command->error("{$destination} already exists.");
}
$filesystem->copyDirectory(__DIR__ . '/../../../../resources/lang', $destination);
$this->command->info("Published {$destination}");
}
示例5: handle
/**
* Handle the command.
*
* @param Filesystem $filesystem
* @param Application $application
* @return string
*/
public function handle(Filesystem $filesystem, Application $application)
{
$destination = $application->getResourcesPath('addons/' . $this->addon->getVendor() . '/' . $this->addon->getSlug() . '-' . $this->addon->getType() . '/views');
if (is_dir($destination) && !$this->command->option('force')) {
$this->command->error("{$destination} already exists.");
return;
}
$filesystem->copyDirectory($this->addon->getPath('resources/views'), $destination);
$this->command->info("Published {$destination}");
}
示例6: fire
/**
* Fire off the handler.
*
* @param \Illuminate\Console\Command $console
* @param string $slug
* @param string $class
* @return bool
*/
public function fire(Command $console, $slug, $class)
{
$this->console = $console;
$this->moduleName = Str::studly($slug);
$this->className = studly_case($class);
if ($this->module->exists($slug)) {
$this->makeFile();
return $this->console->info("Created Module Controller: [{$slug}] " . $this->getFilename());
}
return $this->console->info("Module [{$slug}] does not exist.");
}
示例7: fire
/**
* Fire off the handler.
*
* @param \Illuminate\Console\Command $console
* @param string $slug
* @param string $class
* @return bool
*/
public function fire(Command $console, $slug, $name, $type)
{
$this->console = $console;
$this->moduleName = studly_case($slug);
$this->emailName = snake_case($name);
$this->type = $type;
if ($this->module->exists($this->moduleName)) {
$this->makeFile();
return $this->console->info("Created Module Email View: [{$this->moduleName}] " . $this->getFilename());
}
return $this->console->info("Module [{$this->moduleName}] does not exist.");
}
示例8: handle
/**
* Handle the command.
*
* @param Filesystem $filesystem
* @param Application $application
* @return string
*/
public function handle(Filesystem $filesystem, Application $application)
{
$destination = $application->getResourcesPath('.env');
if (!is_dir(dirname($destination))) {
$filesystem->makeDirectory(dirname($destination), 0777, true, true);
}
if (is_file($destination) && !$this->command->option('force')) {
return $this->command->error("{$destination} already exists.");
}
$filesystem->put($destination, '#EXAMPLE=foo');
$this->command->info("Published {$destination}");
}
示例9: handle
/**
* Handle the command.
*
* @param Filesystem $filesystem
* @param Application $application
* @return string
*/
public function handle(Filesystem $filesystem, Application $application)
{
$destination = $application->getResourcesPath('routes.php');
if (!is_dir(dirname($destination))) {
$filesystem->makeDirectory(dirname($destination), 0777, true, true);
}
if (is_file($destination) && !$this->command->option('force')) {
return $this->command->error("{$destination} already exists.");
}
$content = "<?php\n\n// Route::get('/', function () {\n// return view('welcome');\n// });\n";
$filesystem->put($destination, $content);
$this->command->info("Published {$destination}");
}
示例10: handle
/**
* Handle the command.
*
* @param Container $container
*/
public function handle(Container $container)
{
$step = 1;
$total = $this->installers->count();
/* @var Installer $installer */
while ($installer = $this->installers->shift()) {
if ($this->command) {
$this->command->info("{$step}/{$total} " . trans($installer->getMessage()));
}
$container->call($installer->getTask());
$step++;
}
}
示例11: fire
/**
* Fire off the handler.
*
* @param \Aindong\Pluggables\Console\PluggableMakeMigrationCommand $console
* @param string $slug
*
* @return string
*/
public function fire(Command $console, $slug, $table)
{
$this->console = $console;
$this->pluggableName = Str::studly($slug);
$this->table = strtolower($table);
$this->migrationName = snake_case($this->table);
$this->className = studly_case($this->migrationName);
if ($this->pluggable->exists($this->pluggableName)) {
$this->makeFile();
$this->console->info("Created Pluggable Migration: [{$this->pluggableName}] " . $this->getFilename());
return exec('composer dump-autoload');
}
return $this->console->info("Pluggable [{$this->pluggableName}] does not exist.");
}
示例12: fire
/**
* @param Command $console
* @param $module
*/
public function fire(Command $console, $module)
{
$moduleName = Str::studly($module);
if (!empty($moduleName)) {
foreach ($this->module->all() as $module) {
$this->publish($module);
}
return $console->info("All assets from all modules has been published successfully.");
}
if ($this->module->exists($moduleName)) {
$this->publish($moduleName);
return $console->info("Assets from module [{$moduleName}] has been published successfully.");
}
return $console->info("Module [{$moduleName}] does not exists.");
}
示例13: fire
public function fire($arguments, $options)
{
$instanceId = array_get($arguments, CommandRules::INSTANCE_ID);
$logFile = array_get($arguments, CommandRules::LOGFILE);
$user = array_get($options, CommandRules::USER);
$keyFile = array_get($options, CommandRules::KEY_FILE);
$host = $this->aws->getPublicDNSFromInstanceId($instanceId);
if (is_null($host)) {
$this->command->error('Error: Could not find Host from Instance ID. Please try again.');
} else {
$connection = $this->connectionFactory->createConnection($instanceId, $host, $user, $keyFile);
$connection->run(array('tail -f ' . $logFile), function ($line) {
$this->command->info($line);
});
}
}
示例14: info
/**
* Display info message with date and message, and log it
* @param string $message info message to display & log
*/
public function info($message)
{
// Log message
$this->log($message, 'info');
// Display message
parent::info(date($this->timestampFormat) . ' ' . $message);
}
示例15: fire
/**
* Fire off the handler.
*
* @param \C5\AppKit\Console\ModuleMakeMigrationCommand $console
* @param string $slug
* @return string
*/
public function fire(Command $console, $slug, $table)
{
$this->console = $console;
$this->moduleName = studly_case($slug);
$this->table = str_plural(strtolower($table));
$this->model = str_singular(studly_case($table));
$this->migrationName = 'create_' . snake_case($this->table) . '_table';
$this->className = studly_case($this->migrationName);
if ($this->module->exists($this->moduleName)) {
$this->makeMigration();
$this->makeModel();
$this->console->info("Created Module Migration: [{$this->moduleName}] " . $this->getFilename());
return exec('composer dump-autoload');
}
return $this->console->info("Module [{$this->moduleName}] does not exist.");
}