diff --git a/src/Commands/Publish/GeneratorPublishCommand.php b/src/Commands/Publish/GeneratorPublishCommand.php index 28e526665..761af2a97 100755 --- a/src/Commands/Publish/GeneratorPublishCommand.php +++ b/src/Commands/Publish/GeneratorPublishCommand.php @@ -73,7 +73,7 @@ private function updateRouteServiceProvider() $fileContent = file_get_contents($routeServiceProviderPath); - $search = "Route::prefix('api')".PHP_EOL.str(' ')->repeat(16)."->middleware('api')"; + $search = "Route::middleware('api')".PHP_EOL.str(' ')->repeat(16)."->prefix('api')"; $beforeContent = str($fileContent)->before($search); $afterContent = str($fileContent)->after($search);