use Illuminate\Console\Command; class GreetCommand extends Command { protected $signature = 'greet {name}'; protected $description = 'Greet someone.'; public function handle() { $name = $this->argument('name'); $this->comment("Hello, $name!"); } }
use Illuminate\Console\Command; class ForceCommand extends Command { protected $signature = 'force {--c|confirm : Confirm the action}'; protected $description = 'Do something dangerous with force.'; public function handle() { if ($this->option('confirm')) { // perform the dangerous task } else { $this->comment('This action is dangerous! Please confirm with --confirm option.'); } } }Package Library: The `illuminate.console` package is part of the Laravel framework and provides a set of classes to create and manage console applications.