Skip to content

Commit

Permalink
Improves console output (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jul 25, 2022
1 parent 3823e28 commit e6291e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions composer.json
Expand Up @@ -11,10 +11,10 @@
],
"require": {
"php": "^8.0",
"illuminate/console": "^9.0",
"illuminate/filesystem": "^9.0",
"illuminate/support": "^9.0",
"illuminate/validation": "^9.0"
"illuminate/console": "^9.21",
"illuminate/filesystem": "^9.21",
"illuminate/support": "^9.21",
"illuminate/validation": "^9.21"
},
"require-dev": {
"orchestra/testbench": "^7.0"
Expand Down
6 changes: 3 additions & 3 deletions src/AuthCommand.php
Expand Up @@ -64,7 +64,7 @@ public function handle()
$this->exportBackend();
}

$this->info('Authentication scaffolding generated successfully.');
$this->components->info('Authentication scaffolding generated successfully.');
}

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ protected function exportViews()
{
foreach ($this->views as $key => $value) {
if (file_exists($view = $this->getViewPath($value)) && ! $this->option('force')) {
if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
if (! $this->components->confirm("The [$value] view already exists. Do you want to replace it?")) {
continue;
}
}
Expand All @@ -116,7 +116,7 @@ protected function exportBackend()
$controller = app_path('Http/Controllers/HomeController.php');

if (file_exists($controller) && ! $this->option('force')) {
if ($this->confirm("The [HomeController.php] file already exists. Do you want to replace it?")) {
if ($this->components->confirm("The [HomeController.php] file already exists. Do you want to replace it?")) {
file_put_contents($controller, $this->compileControllerStub());
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/ControllersCommand.php
Expand Up @@ -44,6 +44,6 @@ public function handle()
);
});

$this->info('Authentication scaffolding generated successfully.');
$this->components->info('Authentication scaffolding generated successfully.');
}
}
12 changes: 6 additions & 6 deletions src/UiCommand.php
Expand Up @@ -57,8 +57,8 @@ protected function bootstrap()
{
Presets\Bootstrap::install();

$this->info('Bootstrap scaffolding installed successfully.');
$this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
$this->components->info('Bootstrap scaffolding installed successfully.');
$this->components->warn('Please run [npm install && npm run dev] to compile your fresh scaffolding.');
}

/**
Expand All @@ -71,8 +71,8 @@ protected function vue()
Presets\Bootstrap::install();
Presets\Vue::install();

$this->info('Vue scaffolding installed successfully.');
$this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
$this->components->info('Vue scaffolding installed successfully.');
$this->components->warn('Please run [npm install && npm run dev] to compile your fresh scaffolding.');
}

/**
Expand All @@ -85,7 +85,7 @@ protected function react()
Presets\Bootstrap::install();
Presets\React::install();

$this->info('React scaffolding installed successfully.');
$this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
$this->components->info('React scaffolding installed successfully.');
$this->components->warn('Please run [npm install && npm run dev] to compile your fresh scaffolding.');
}
}

0 comments on commit e6291e8

Please sign in to comment.