Skip to content

Commit 3e72cda

Browse files
committed
ITT: Greeting message method added with option.
1 parent e4a5889 commit 3e72cda

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/fixture/app/Console/Commands/GenericCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
class GenericCommand extends Command
66
{
7-
protected $signature = 'generic';
7+
protected $signature = 'generic {--name= : Name for greeting message}';
88

9-
public function getSomethingImportant()
9+
public function getGreetingMessage()
1010
{
11-
return 'Important!';
11+
$name = $this->option('name') ?: 'Dude';
12+
return "Hello, {$name}!";
1213
}
1314

1415
public function handle()

0 commit comments

Comments
 (0)