@@ -24,6 +24,7 @@ class Routes extends Command
2424 protected string $ description = 'Shows routes list. ' ;
2525 protected string $ usage = 'routes [options] ' ;
2626 protected string $ routerInstance = 'default ' ;
27+ protected string $ group = 'Routing ' ;
2728
2829 public function run () : void
2930 {
@@ -32,15 +33,15 @@ public function run() : void
3233 $ this ->routerInstance = $ instance ;
3334 }
3435 CLI ::write (
35- CLI ::style ('Router Instance: ' , CLI :: FG_YELLOW , formats: [CLI :: FM_BOLD ])
36+ CLI ::style ('Router Instance: ' , ' yellow ' , formats: [' bold ' ])
3637 . ' ' . $ this ->routerInstance
3738 );
3839 CLI ::newLine ();
3940 $ data = $ this ->collectData ();
4041 $ count = \count ($ data );
4142 $ this ->showCollectionsSet ($ count );
4243 foreach ($ data as $ index => $ collection ) {
43- CLI ::write (CLI ::style ('Route Collection ' . ($ index + 1 ), CLI :: FG_YELLOW , formats: [CLI :: FM_BOLD ]));
44+ CLI ::write (CLI ::style ('Route Collection ' . ($ index + 1 ), ' yellow ' , formats: [' bold ' ]));
4445 $ this ->writeHeader ('Origin ' , $ collection ['origin ' ]);
4546 if (isset ($ collection ['name ' ])) {
4647 $ this ->writeHeader ('Name ' , $ collection ['name ' ]);
@@ -64,21 +65,21 @@ public function run() : void
6465 protected function showCollectionsSet (int $ count ) : void
6566 {
6667 if ($ count === 0 ) {
67- CLI ::write ('No Route Collection has been set. ' , CLI :: FG_RED );
68+ CLI ::write ('No Route Collection has been set. ' , ' red ' );
6869 return ;
6970 }
7071 $ plural = $ count > 1 ;
7172 CLI ::write (
7273 'There ' . ($ plural ? 'are ' : 'is ' ) . ' ' . $ count
7374 . ' Route Collection ' . ($ plural ? 's ' : '' ) . ' set: ' ,
74- CLI :: FG_GREEN
75+ ' green '
7576 );
7677 CLI ::newLine ();
7778 }
7879
7980 protected function writeHeader (string $ field , string $ value ) : void
8081 {
81- CLI ::write (CLI ::style ($ field . ': ' , formats: [CLI :: FM_BOLD ]) . ' ' . $ value );
82+ CLI ::write (CLI ::style ($ field . ': ' , formats: [' bold ' ]) . ' ' . $ value );
8283 }
8384
8485 /**
0 commit comments