@@ -206,8 +206,13 @@ protected function writePostmanCollection(Collection $parsedRoutes): void
206206 $ collectionPath = "{$ this ->outputPath }/collection.json " ;
207207 file_put_contents ($ collectionPath , $ collection );
208208 } else {
209- Storage::disk ('local ' )->put ('apidoc/collection.json ' , $ collection );
210- $ collectionPath = 'storage/app/apidoc/collection.json ' ;
209+ $ storageInstance = Storage::disk ($ this ->config ->get ('storage ' ));
210+ $ storageInstance ->put ('apidoc/collection.json ' , $ collection , 'public ' );
211+ if ($ this ->config ->get ('storage ' ) == 'local ' ) {
212+ $ collectionPath = 'storage/app/apidoc/collection.json ' ;
213+ } else {
214+ $ collectionPath = $ storageInstance ->url ('collection.json ' );
215+ }
211216 }
212217
213218 $ this ->output ->info ("Wrote Postman collection to: {$ collectionPath }" );
@@ -280,8 +285,8 @@ protected function moveOutputFromSourceFolderToTargetFolder(): void
280285 rename ("{$ this ->sourceOutputPath }/index.html " , "$ this ->outputPath /index.blade.php " );
281286 $ contents = file_get_contents ("$ this ->outputPath /index.blade.php " );
282287 //
283- $ contents = str_replace ('href="https://github.com/css/style.css" ' , 'href="https://github.com/docs/css/style.css" ' , $ contents );
284- $ contents = str_replace ('src="https://github.com/js/all.js" ' , 'src="https://github.com/docs/js/all.js" ' , $ contents );
288+ $ contents = str_replace ('href="https://github.com/css/style.css" ' , 'href="https://github.com/%3Cspan%20class="x x-first">{{ asset( \' /docs/css/style.css \' ) }} " ', $ contents );
289+ $ contents = str_replace ('src="https://github.com/js/all.js" ' , 'src="https://github.com/%3Cspan%20class="x x-first">{{ asset( \' /docs/js/all.js \' ) }} " ', $ contents );
285290 $ contents = str_replace ('src="images/ ' , 'src="/docs/images/ ' , $ contents );
286291 $ contents = preg_replace ('#href="https?://.+?/docs/collection.json"# ' , 'href="{{ route("apidoc.json") }}" ' , $ contents );
287292 file_put_contents ("$ this ->outputPath /index.blade.php " , $ contents );
0 commit comments