Skip to content

Commit c0b2dd5

Browse files
committed
update
1 parent 3ade06e commit c0b2dd5

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

examples/app

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ $app->setLogo("
1616
/ ____/ / / _/ / | ____ ____ / (_)________ _/ /_(_)___ ____
1717
/ / / / / / / /| | / __ \/ __ \/ / / ___/ __ `/ __/ / __ \/ __ \
1818
/ /___/ /____/ / / ___ |/ /_/ / /_/ / / / /__/ /_/ / /_/ / /_/ / / / /
19-
\____/_____/___/ /_/ |_/ .___/ .___/_/_/\___/\__,_/\__/_/\____/_/ /_/
19+
\____/_____/___/ /_/ |_/ .___/ .___/_/_/\___/\____/\__/_/\____/_/ /_/
2020
/_/ /_/
2121
", 'success');
2222

23-
// require dirname(__DIR__) . '/boot/cli-services.php';
24-
2523
require __DIR__ . '/routes.php';
2624

2725
// run

examples/routes.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
$app->controller(ProcessController::class, null, [
3636
'aliases' => 'prc'
3737
]);
38+
39+
// add alias for a group command.
40+
$app->addCommandAliases('home:test', 'h-test');

src/Application.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,11 @@ protected function dispatch($name)
267267
$action = '';
268268

269269
// like 'home:index'
270-
if (strpos($name, $sep) > 0) {
271-
$input = array_values(array_filter(explode($sep, $name)));
272-
list($name, $action) = \count($input) > 2 ? array_splice($input, 2) : $input;
270+
if (strpos($realName, $sep) > 0) {
271+
$input = array_values(array_filter(explode($sep, $realName)));
272+
list($realName, $action) = \count($input) > 2 ? array_splice($input, 2) : $input;
273273
}
274274

275-
$realName = $this->getRealCommandName($name);
276-
277275
if ($this->isController($realName)) {
278276
return $this->runAction($realName, $action, true);
279277
}

src/BuiltIn/Resources/art-fonts/app-name.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
/ ___| | |_ _| / \ _ __ _ __ | (_) ___ __ _| |_(_) ___ _ __
33
| | | | | | / _ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ \
44
| |___| |___ | | / ___ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | |
5-
\____|_____|___| /_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
5+
\____|_____|___| /_/ \_\ .__/| .__/|_|_|\___\____|\__|_|\___/|_| |_|
66
|_| |_|

src/BuiltIn/Resources/art-fonts/app-name_italic.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
/ ____/ / / _/ / | ____ ____ / (_)________ _/ /_(_)___ ____
33
/ / / / / / / /| | / __ \/ __ \/ / / ___/ __ `/ __/ / __ \/ __ \
44
/ /___/ /____/ / / ___ |/ /_/ / /_/ / / / /__/ /_/ / /_/ / /_/ / / / /
5-
\____/_____/___/ /_/ |_/ .___/ .___/_/_/\___/\__,_/\__/_/\____/_/ /_/
5+
\____/_____/___/ /_/ |_/ .___/ .___/_/_/\___/\____/\__/_/\____/_/ /_/
66
/_/ /_/

0 commit comments

Comments
 (0)