Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

maxxd's avatar
Level 2

Dedoc/Scramble package not working

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.

0 likes
5 replies
Tray2's avatar

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.

maxxd's avatar
Level 2

.env APP_ENV is local - thought I'd put that in the original post, sorry.

ebarbara's avatar

I'm having the same problem. Just installed dedoc/scramble, my APP_ENV is set as local, and the endpoints /doc/api and /doc/api.json shows as 404.

Strangely, a json of the api is being shown in /doc. It's possible they changed the endpoints without documenting it? Forget it, its a endpoint from L5-swagger, not Scramble.

ebarbara's avatar

After checking some discussions on scramble discord, I just removed the L5-swagger, and Scramble started to work like magic. @maxxd , check if this solves your problem (assuming you have these two packages coexisting)

maxxd's avatar
Level 2

I don't recall specifically installing L5-swagger, but worth a shot...

Unfortunately that's not it for me - I don't have swagger included.

Please or to participate in this conversation.