Skip to content

Commit 899bc40

Browse files
committed
✨ add create:view help
Signed-off-by: otengkwame <[email protected]>
1 parent 44ea8c3 commit 899bc40

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Core/core/Console/Commands/Help.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public static function showHelp(): void
5757
$output .= ConsoleColor::light_purple(" create:package") . ConsoleColor::cyan(" Create a package by specifying which sub-directories to use e.g --mvc, --c, --m, --s") . " \n";
5858
$output .= ConsoleColor::light_purple(" create:controller") . ConsoleColor::cyan(" Create a controller by specifying which module it belongs with") . " \n";
5959
$output .= ConsoleColor::light_purple(" create:model") . ConsoleColor::cyan(" Create a model by specifying which module it belongs with") . " \n";
60+
$output .= ConsoleColor::light_purple(" create:view") . ConsoleColor::cyan(" Create a view by specifying which path and file name to give or a module it belongs with.") . " \n";
6061
$output .= ConsoleColor::light_purple(" create:service") . ConsoleColor::cyan(" Create a service by specifying which module it belongs with") . " \n";
6162
$output .= ConsoleColor::light_purple(" create:action") . ConsoleColor::cyan(" Create an action by specifying which module it belongs with") . " \n";
6263
$output .= ConsoleColor::light_purple(" create:library") . ConsoleColor::cyan(" Create a library by specifying which module it belongs with") . " \n";
@@ -492,6 +493,29 @@ private static function create_model()
492493
CREATEMODEL;
493494
}
494495

496+
private static function create_view()
497+
{
498+
$welcome = static::welcome();
499+
$usage = static::hereColor('Usage:', 'yellow');
500+
$description = static::hereColor('Description:', 'yellow');
501+
$examples = static::hereColor('Examples:', 'yellow');
502+
503+
echo <<<CREATEVIEW
504+
{$welcome}
505+
{$description}
506+
Create a view by specifying which path and file name to give or a module it belongs with.
507+
508+
{$usage}
509+
php webby create:view <module-type:module-name> <view-file-path.extension>
510+
511+
{$examples}
512+
php webby create:view users/list-users.php
513+
php webby create:view web:app users/list-users.php
514+
php webby create:view web:app users/list-user.php --plates
515+
516+
CREATEVIEW;
517+
}
518+
495519
private static function create_service()
496520
{
497521
$welcome = static::welcome();
@@ -798,6 +822,9 @@ public static function whichHelp($command)
798822
case 'create:model':
799823
Help::create_model();
800824
break;
825+
case 'create:view':
826+
Help::create_view();
827+
break;
801828
case 'create:service':
802829
Help::create_service();
803830
break;

0 commit comments

Comments
 (0)