PHPackages                             laranail/demo-mode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. laranail/demo-mode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laranail/demo-mode
==================

Comprehensive, granular, license-aware demo/sandbox controller for Laravel products — read-only &amp; write guards, per-model/route/feature gating, reset/restore strategies, per-visitor sandboxing, demo accounts and banner. Complements laranail/license-verifier without re-implementing it. CLI/TUI-first.

v0.1.0(1mo ago)00MITPHPPHP ^8.4 || ^8.5CI passing

Since Jul 6Pushed 1mo agoCompare

[ Source](https://github.com/laranail/demo-mode)[ Packagist](https://packagist.org/packages/laranail/demo-mode)[ Docs](https://opensource.simtabi.com/documentation/laranail/demo-mode/)[ RSS](/packages/laranail-demo-mode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (19)Versions (2)Used By (0)

laranail/demo-mode
==================

[](#laranaildemo-mode)

[![Latest version on Packagist](https://camo.githubusercontent.com/20b3fbfad8a136d0512dadef415118de0ff2ccbd42a7f5aeb084a8d750028bb7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616e61696c2f64656d6f2d6d6f64652e737667)](https://packagist.org/packages/laranail/demo-mode)[![Tests](https://github.com/laranail/demo-mode/actions/workflows/tests.yml/badge.svg)](https://github.com/laranail/demo-mode/actions/workflows/tests.yml)[![Static analysis](https://github.com/laranail/demo-mode/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/laranail/demo-mode/actions/workflows/static-analysis.yml)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

> A granular, license-aware demo / sandbox controller for Laravel products — block writes, gate features, reset data periodically, isolate visitors, auto-login, and show a banner, all configurable with sensible defaults.

Requires PHP `^8.4 || ^8.5` on Laravel `^13`. Complements [`laranail/license-verifier`](https://opensource.simtabi.com/documentation/laranail/license-verifier/) (a trial app can drop into demo mode automatically) but works standalone with no hard dependency.

Install
-------

[](#install)

```
composer require laranail/demo-mode
php artisan vendor:publish --tag="demo-mode-config"
```

The service provider and the `Demo` facade are auto-discovered.

Quick start
-----------

[](#quick-start)

Turn demo mode on (or drive it from the license):

```
DEMO_MODE_ENABLED=true        # manual toggle
# DEMO_MODE_TRIGGER=license   # or: demo when the license is not usable
```

Block writes on your routes and models, and gate a feature:

```
Route::middleware('demo.readonly')->group(/* writes blocked in demo */);
Route::post('export', ...)->middleware('demo.feature:export');
```

```
use Simtabi\Laranail\Demo\Mode\Concerns\PreventsDemoWrites;

class Setting extends Model
{
    use PreventsDemoWrites; // all writes blocked in demo
}
```

```
@demo Demo @enddemo
```

See [Getting started](docs/getting-started.md) for every surface — facade, middleware, controllers, models, Blade, and events.

What it controls
----------------

[](#what-it-controls)

ConcernMechanismDocsActivation`manual` / `license` / `both` / `environment` / `schedule` triggers, plus bypass by role/ability/id/IP/gate[Configuration](docs/configuration.md) · [License integration](docs/license-integration.md)Write protectionlayered: HTTP middleware + Eloquent guard + strict/read-only connection[Write guards](docs/tools/guards.md)Feature gatingnamed features, entitlement-aware (paying customers keep full functionality)[Getting started](docs/getting-started.md)Reset &amp; restorepluggable strategies (`migrate-fresh-seed`, snapshot, SQL dump, callback), scheduled or on demand[Reset &amp; restore](docs/tools/reset-strategies.md)Visitor isolation`shared` / `transactional` / `scoped` / `tenant` sandboxes[Per-visitor sandbox](docs/tools/sandbox.md)Demo UX &amp; safetybanner, demo accounts / auto-login, side effects to safe sinks (mail → log)[Configuration](docs/configuration.md) · [Security](docs/security.md)Documentation
------------------------------------------------------

[](#documentation)

Full documentation is at **[opensource.simtabi.com/documentation/laranail/demo-mode](https://opensource.simtabi.com/documentation/laranail/demo-mode/)** — getting started, activation triggers, write protection, per-model/route/feature gating, reset strategies, per-visitor sandboxing, middleware, the Artisan commands, and configuration.

### Guides

[](#guides)

- [Installation](docs/installation.md) — requirements, publishing, optional dependencies, scheduling.
- [Getting started](docs/getting-started.md) — facade, middleware, controllers, models, Blade, events.
- [Configuration](docs/configuration.md) — every section of `config/demo-mode.php`.
- [Architecture](docs/architecture.md) — components, activation/request/reset flows, prior art.
- [License integration](docs/license-integration.md) — driving demo mode from the license state.
- [Security &amp; threat model](docs/security.md) — what the guards do and do not protect against.
- [Release](docs/release.md) — versioning and how releases are cut.

### Reference

[](#reference)

- [Commands](docs/tools/commands.md) — `laranail::demo-mode.*` and the `demo:*` aliases.
- [Write guards](docs/tools/guards.md) — the layered write-protection model and strategies.
- [Reset &amp; restore](docs/tools/reset-strategies.md) — strategies, scope, safety, triggers.
- [Per-visitor sandbox](docs/tools/sandbox.md) — shared, transactional, scoped, and tenant isolation.

Stability
---------

[](#stability)

Semver. The package is on the `0.x` line — minor versions may contain breaking changes until 1.0; pin to a patch range and read the [CHANGELOG](CHANGELOG.md) and [UPGRADE guide](UPGRADE.md) before upgrading.

Local development
-----------------

[](#local-development)

```
composer install
composer test    # pest
composer lint    # pint + phpstan + rector --dry-run
```

Sister packages
---------------

[](#sister-packages)

The laranail licensing family:

PackageWhat it is[`laranail/license-kit`](https://opensource.simtabi.com/documentation/laranail/license-kit/)Server-side licensing — activation keys, polymorphic assignment, expirations/renewals, seat control.[`laranail/license-verifier`](https://opensource.simtabi.com/documentation/laranail/license-verifier/)Headless, provider-agnostic verification client — PASETO/Ed25519 offline verification, fingerprinting, seats, grace periods.[`laranail/license-verifier-ui`](https://opensource.simtabi.com/documentation/laranail/license-verifier-ui/)UI engine for the verifier — scaffolds owned, themeable preset packages (Blade, Livewire, Filament, Vue).[`laranail/product-updater`](https://opensource.simtabi.com/documentation/laranail/product-updater/)License-gated self-update engine — checks a source, verifies archives, applies releases safely.Community
---------

[](#community)

Questions, bug reports, and ideas go to [GitHub Issues](https://github.com/laranail/demo-mode/issues).

Contributing &amp; security
---------------------------

[](#contributing--security)

Issues and PRs are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). Report vulnerabilities per [SECURITY.md](SECURITY.md) (); participation follows the [Code of Conduct](CODE_OF_CONDUCT.md).

License
-------

[](#license)

MIT © Simtabi LLC. See [LICENSE](LICENSE).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3108393?v=4)[Simtabi](/maintainers/simtabi)[@simtabi](https://github.com/simtabi)

---

Top Contributors

[![imanimanyara](https://avatars.githubusercontent.com/u/19682005?v=4)](https://github.com/imanimanyara "imanimanyara (1 commits)")

---

Tags

laravelRead onlydemosandboxresetlicensingdemo modelaranail

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/laranail-demo-mode/health.svg)

```
[![Health](https://phpackages.com/badges/laranail-demo-mode/health.svg)](https://phpackages.com/packages/laranail-demo-mode)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

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

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M163](/packages/laravel-cashier)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M341](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)

PHPackages © 2026

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