I am currently using http://apidocjs.com/ as my laravel apidoc because I am just used to it before.
to view the apidoc, each time I have to drag the index.html
into the browser which is quite annoying.
Is it possible to make it into a static page so people I am sharing the apidoc with can just generate the doc then go to the route.
I tried something like...putting my apidoc
folder under public
folder of the application and also tried adding a route such as
Route::get('/apidoc', function(){
return File::get(public_path() . '/apidoc/index.html');
});
Both of them didn't work the index.html
cannot load the css
and js
because in index.html
the source url is something like vendor/polyfill.js
which then tried to go localhost:8000/vendor/polyfill.js
but actually the url should be something like localhost:8000/apidoc/vendor/polyfill.js
Does anyone know how to easily fix this?
Thanks in advance for any help