Scramble 0.11.0 is here! Laravel Data support, schema enforcement and more
Learn more
Installation & setup
On this page
Scramble PRO
Comprehensive API documentation generation for Spatie’s Laravel Data and Laravel Query Builder.
Scramble requires:
- PHP 8.1 or higher
- Laravel 10.x or higher
You can install Scramble via composer:
When Scramble is installed, 2 routes are added to your application:
/docs/api
- UI viewer for your documentation/docs/api.json
- Open API document in JSON format describing your API.
And that’s it! You can now visit /docs/api
to see your API documentation.
By default, these routes are available only in local
environment. You can change this behavior by defining viewApiDocs
gate.
Publishing config
Optionally, you can publish the package’s config file:
This will allow you to customize API routes resolution and OpenAPI document’s details.
The content of scramble
config: