@@ -206,8 +206,13 @@ protected function writePostmanCollection(Collection $parsedRoutes): void
206
206
$ collectionPath = "{$ this ->outputPath }/collection.json " ;
207
207
file_put_contents ($ collectionPath , $ collection );
208
208
} 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
+ }
211
216
}
212
217
213
218
$ this ->output ->info ("Wrote Postman collection to: {$ collectionPath }" );
@@ -280,8 +285,8 @@ protected function moveOutputFromSourceFolderToTargetFolder(): void
280
285
rename ("{$ this ->sourceOutputPath }/index.html " , "$ this ->outputPath /index.blade.php " );
281
286
$ contents = file_get_contents ("$ this ->outputPath /index.blade.php " );
282
287
//
283
- $ contents = str_replace ('href="css/style.css" ' , 'href="/docs/css/style.css" ' , $ contents );
284
- $ contents = str_replace ('src="js/all.js" ' , 'src="/docs/js/all.js" ' , $ contents );
288
+ $ contents = str_replace ('href="css/style.css" ' , 'href="{{ asset( \' /docs/css/style.css \' ) }} " ' , $ contents );
289
+ $ contents = str_replace ('src="js/all.js" ' , 'src="{{ asset( \' /docs/js/all.js \' ) }} " ' , $ contents );
285
290
$ contents = str_replace ('src="images/ ' , 'src="/docs/images/ ' , $ contents );
286
291
$ contents = preg_replace ('#href="https?://.+?/docs/collection.json"# ' , 'href="{{ route("apidoc.json") }}" ' , $ contents );
287
292
file_put_contents ("$ this ->outputPath /index.blade.php " , $ contents );
0 commit comments