How have you set up you .env?
By default, these routes are available only in local environment. You can change this behavior by defining viewApiDocs gate.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm working on an API using Laravel 11.20.0 and want to try using dedoc/scramble ^0.11.11 to document the endpoints. I've followed the instructions, but I'm getting a 404 error at /docs/api.
According to the documentation, installing the package should work out of the box - I've got a fallback route defined in my routes/web.php file but commenting that out doesn't make a difference even after clearing all caches. Most everything I've found via google search is about publishing documentation to prod (which I'm not trying to do - this is still at this point local) or solved by overlapping routes (which I don't have). Running php artisan routes:list shows both /docs/api and docs/api.json as I expect but both return a 404.
Many thanks in advance to anyone with advice.
Please or to participate in this conversation.