@@ 162-174 (lines=13) @@ | ||
159 | * @param $routePrefix |
|
160 | * @return array |
|
161 | */ |
|
162 | private function processLaravelRoutes(AbstractGenerator $generator, $allowedRoutes, $routePrefix) |
|
163 | { |
|
164 | $routes = $this->getRoutes(); |
|
165 | $bindings = $this->getBindings(); |
|
166 | $parsedRoutes = []; |
|
167 | foreach ($routes as $route) { |
|
168 | if (in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->getUri())) { |
|
169 | $parsedRoutes[] = $generator->processRoute($route, $bindings); |
|
170 | $this->info('Processed route: '.$route->getUri()); |
|
171 | } |
|
172 | } |
|
173 | return $parsedRoutes; |
|
174 | } |
|
175 | ||
176 | /** |
|
177 | * @param AbstractGenerator $generator |
|
@@ 182-194 (lines=13) @@ | ||
179 | * @param $routePrefix |
|
180 | * @return array |
|
181 | */ |
|
182 | private function processDingoRoutes(AbstractGenerator $generator, $allowedRoutes, $routePrefix) |
|
183 | { |
|
184 | $routes = $this->getRoutes(); |
|
185 | $bindings = $this->getBindings(); |
|
186 | $parsedRoutes = []; |
|
187 | foreach ($routes as $route) { |
|
188 | if (empty($allowedRoutes) || in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->uri())) { |
|
189 | $parsedRoutes[] = $generator->processRoute($route, $bindings); |
|
190 | $this->info('Processed route: '.$route->uri()); |
|
191 | } |
|
192 | } |
|
193 | return $parsedRoutes; |
|
194 | } |
|
195 | } |
|
196 |