PHPackages                             victormgomes/scramble-extensions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. victormgomes/scramble-extensions

ActiveLibrary[API Development](/categories/api)

victormgomes/scramble-extensions
================================

Useful extensions for the dedoc/scramble package

1.0.0(2mo ago)1867[3 PRs](https://github.com/VictorMGomes/scramble-extensions/pulls)MITPHPPHP ^8.4CI passing

Since Sep 5Pushed 2mo agoCompare

[ Source](https://github.com/VictorMGomes/scramble-extensions)[ Packagist](https://packagist.org/packages/victormgomes/scramble-extensions)[ Docs](https://github.com/victormgomes/scramble-extensions)[ GitHub Sponsors](https://github.com/sponsors/VictorMGomes)[ RSS](/packages/victormgomes-scramble-extensions/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (40)Versions (14)Used By (0)

Scramble Extensions
===================

[](#scramble-extensions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/62b35d27d5f91a105f7e04c2add7bda4b72e4161144db52b07dff2910ffae92b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766963746f726d676f6d65732f736372616d626c652d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/scramble-extensions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/effc6139aeddd59478e7d68ceb812d8e77c576cad3a8f1688bfb64ff24a74b43/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f766963746f726d676f6d65732f736372616d626c652d657874656e73696f6e732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/victormgomes/scramble-extensions/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5963726cef16070570b9825e8f44a5c2a4bc8d4fe70d4fc4c2eaafddc932e5cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f766963746f726d676f6d65732f736372616d626c652d657874656e73696f6e732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/victormgomes/scramble-extensions/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/177f58d3996b9e9ab600d07adff6e098e42f7390d8e2f1995d3fcabe3d53da46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766963746f726d676f6d65732f736372616d626c652d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/scramble-extensions)[![License](https://camo.githubusercontent.com/bcb2903cf1f6ec03476ce1b2cd699ed1e992cc7f30269a937320f9fededb83cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766963746f726d676f6d65732f736372616d626c652d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/scramble-extensions)

**Useful extensions for the dedoc/scramble package**

---

Introduction
------------

[](#introduction)

**Scramble Extensions** provides a collection of powerful tools to supercharge your `dedoc/scramble` documentation. It automates common API documentation tasks like adding security headers, handling multi-tenancy, and providing deep integration for Spatie's Laravel Data DTOs.

### Why use this package?

[](#why-use-this-package)

- **Automation**: Automatically add Authorization and Tenant headers to your OpenAPI specification.
- **Rich DTO Support**: Seamlessly generate schemas for complex DTOs built with `spatie/laravel-data`.
- **Clean Documentation**: Keep your controller annotations minimal by letting these extensions handle the global requirements of your API.
- **Better DX**: Provide a much more accurate and interactive "Try It" experience in your documentation UI.

---

Support us
----------

[](#support-us)

We invest a lot of resources into creating [best in class open source packages](https://github.com/victormgomes). You can support us by [sponsoring us on GitHub](https://github.com/sponsors/VictorMGomes).

---

Installation
------------

[](#installation)

```
composer require victormgomes/scramble-extensions
```

---

Usage
-----

[](#usage)

Register the desired extensions in your `config/scramble.php` file:

```
//config/scramble.php
return [
    // ...
    'extensions' => [
        \Victormgomes\ScrambleExtensions\Extensions\AddAuthorizationHeader::class,
        \Victormgomes\ScrambleExtensions\Extensions\AddTenantHeader::class,
        \Victormgomes\ScrambleExtensions\Extensions\SpatieData::class,
    ],
];
```

### Included Extensions

[](#included-extensions)

- **AddAuthorizationHeader**: Automatically adds the Bearer token field to authenticated routes.
- **AddTenantHeader**: Injects the required Tenant-ID header for multi-tenant routes.
- **SpatieData**: Generates accurate OpenAPI schemas from `spatie/laravel-data` objects.

---

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Victor M. Gomes](https://github.com/VictorMGomes)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 67.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~13 days

Total

9

Last Release

85d ago

Major Versions

0.1.7 → 1.0.02026-05-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20375480?v=4)[Victor M. Gomes](/maintainers/victormgomes)[@VictorMGomes](https://github.com/VictorMGomes)

---

Top Contributors

[![victormgomes](https://avatars.githubusercontent.com/u/20375480?v=4)](https://github.com/victormgomes "victormgomes (21 commits)")[![VictorMGomes](https://avatars.githubusercontent.com/u/20375480?v=4)](https://github.com/VictorMGomes "VictorMGomes (10 commits)")

---

Tags

laravelopenapiphplaravelVictor M. Gomesscramble-extensions

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/victormgomes-scramble-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/victormgomes-scramble-extensions/health.svg)](https://phpackages.com/packages/victormgomes-scramble-extensions)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M140](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

219.6k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
