Download the PHP package lauroguedes/laravel-demo-mode without Composer

On this page you can find all versions of the php package lauroguedes/laravel-demo-mode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-demo-mode

Laravel Demo Mode

Tests Latest Version Packagist Downloads

Turn a Laravel installation into a public playground: seeded data, a scheduled reset, rotating credentials published on the login page, and a belt of restrictions that keeps a stranger from abusing the server.

Publishing a starter kit, a boilerplate or a SaaS with a browsable demo needs the same five pieces every time — a flag, a rebuild on a cycle, credentials a stranger can use that do not become a permanent fact of the internet, a list of things the demo must not do, and a visible notice that the data is temporary. This is those five pieces, extracted from two demos that have been running in public.

This package drops tables. Read docs/security.md before you install it anywhere. A wrong configuration erases your database.

Laravel Demo Mode pill bar on bottom centralized

Installation

demo:install is additive: it publishes the config, appends the DEMO_ keys to .env.example, and offers to write a DemoSeeder stub. It does not touch .env and it does not turn the demo on — that is an act you perform on the deployment you meant.

It asks two questions, because neither answer can be inferred from the project: whether every visitor sees the same data or each gets their own corner of it, and whether to start a DemoSeeder or point the reset at a seeder you already have. Answer shared if you are not sure. --sandbox=shared|scoped and --without-seeder answer both for a script, and a run with nobody at the keyboard takes shared and writes the seeder.

Making an installation a demo

Write the demonstration data into database/seeders/DemoSeeder.php, then check your work:

It exits non-zero on anything that would destroy data or publish a secret, so it belongs in your deploy pipeline ahead of the first reset.

Using it

For Inertia, return Demo::toArray() from your own HandleInertiaRequests::share(). For Blade and Livewire, the optional ShareDemoState middleware puts the same payload in every view. See docs/frontend.md.

Letting visitors reset it

Off by default — it puts a migrate:fresh behind an HTTP request. Throttled, cooled down, queued, CSRF-protected and host-checked; see docs/on-demand-reset.md.

Isolating visitors from each other

Each visitor gets the seeded baseline plus what they created. Not multi-tenancy and not a security boundary; see docs/sandbox.md.

Commands

Command What it does
demo:install Publish the config, and a seeder stub if you want one
demo:reset Rebuild the demonstration data. --dry-run prints the plan
demo:status What this installation currently is
demo:doctor Audit the configuration. Non-zero exit on anything dangerous
demo:credentials Show, or --rotate, the published passwords
demo:snapshot Capture the baseline the snapshot strategy restores
demo:sandbox:prune Remove the sandboxes nobody came back to

Working with an AI agent

If the project uses Laravel Boost, this package ships its own guidelines and an agent skill. php artisan boost:install picks them up with no configuration.

The guidelines are the short, always-loaded part: that this package drops tables, that Demo::enabled() is the single source of truth, that the view components already decide for themselves whether to render, and that a seeder must read the published password from Demo::passwordFor() rather than hardcoding one — which is the mistake that fails silently after the first rotation.

The demo-mode-development skill carries the rest, loaded only when it is relevant: reset strategies, per-visitor isolation, cleaners, restrictions, write guards and the on-demand reset.

What it is not

Documentation

Full documentation is in docs/. Start with security.md — it is the one that is not optional.

Already have a hand-rolled demo mode? UPGRADE.md is mostly a list of things to delete.

Testing

Credits

Extracted from lauroguedes/laravel-sso and lauroguedes/mary-ui-starter-kit, which had each solved this badly in their own way first.

License

The MIT License. See LICENSE.md.


If this is useful to you, please star the repository.
It is the thing that helps other people find it.

⭐ Star this project  ·  ☕ Buy me a coffee

Crafted by an Artisan ♥ Lauro Guedes


All versions of laravel-demo-mode with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^13.0
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/process Version ^13.0
illuminate/support Version ^13.0
symfony/process Version ^7.4|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lauroguedes/laravel-demo-mode contains the following files

Loading the files please wait ...