@@ -61,6 +61,11 @@ public function testAddAfter(): void
61
61
62
62
$routes->get('/', 'Home::index');
63
63
64
+ $routes->group('admin', static function ($routes) {
65
+ $routes->get('users', 'Admin\Users::index');
66
+ $routes->get('blog', 'Admin\Blog::index');
67
+ });
68
+
64
69
/**
65
70
* You will have access to the $routes object within that file without
66
71
* needing to reload it.
@@ -69,7 +74,7 @@ public function testAddAfter(): void
69
74
FILE;
70
75
71
76
$ text = 'service( \'auth \')->routes($routes); ' ;
72
- $ pattern = '/(.*)(\n ' . preg_quote ('$routes-> ' , '/ ' ) . '[^\n]+?\n)/su ' ;
77
+ $ pattern = '/(.*)(\n ' . preg_quote ('$routes-> ' , '/ ' ) . '[^\n]+?; \n)/su ' ;
73
78
$ replace = '$1$2 ' . "\n" . $ text . "\n" ;
74
79
$ output = $ replacer ->add ($ content , $ text , $ pattern , $ replace );
75
80
@@ -88,6 +93,11 @@ public function testAddAfter(): void
88
93
89
94
service('auth')->routes($routes);
90
95
96
+ $routes->group('admin', static function ($routes) {
97
+ $routes->get('users', 'Admin\Users::index');
98
+ $routes->get('blog', 'Admin\Blog::index');
99
+ });
100
+
91
101
/**
92
102
* You will have access to the $routes object within that file without
93
103
* needing to reload it.
0 commit comments