PHPackages                             lpfuri/laravel-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. lpfuri/laravel-demo-mode

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

lpfuri/laravel-demo-mode
========================

Add demo features to your Laravel app.

v1.0.2(3y ago)055MITPHPPHP ^7.4|^8.0

Since Mar 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lpfuri/laravel-demo-mode)[ Packagist](https://packagist.org/packages/lpfuri/laravel-demo-mode)[ RSS](/packages/lpfuri-laravel-demo-mode/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (5)Used By (0)

Laravel Demo Mode
-----------------

[](#laravel-demo-mode)

Add demo features to your Laravel app.

So you simply want to have a demo installation of your app for everyone to try online. First you seed it with one user to show some credentials to anyone to log in and some data you think it's fine for the demo.

Now this package allows your app to do a few things really easy:

- Blocks one user in the database so it acts as demo user and can't be updated or deleted.
- Tells the app that demo mode is on so it can show demo user credentials.
- Make a backup of the demo database that will be restored in some regular period of time.

Right now this package only works with eloquent extended users and mysql databases.

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

[](#installation)

Install the package through [Composer](http://getcomposer.org/).

Run the Composer require command from the Terminal:

```
composer require lpfuri/laravel-demo-mode

```

Usage
-----

[](#usage)

After installing the package you can have everything done in three steps:

### Set database backup

[](#set-database-backup)

Use the package facade (Lpfuri\\LaravelDemoMode\\Facades\\DemoMode) and use this to check app state and show demo user credentials:

```
DemoMode::isDemoModeOn();
```

### Backup database for restoring

[](#backup-database-for-restoring)

Type in terminal:

```
php artisan demo-mode:backup

```

### Set demo mode on

[](#set-demo-mode-on)

Type in terminal:

```
php artisan demo-mode:on

```

By default user with id value 1 will be the demo user and database will be restored every day (Schedule must be running). You can change this values in the config file. Keep in mind that whenever a user tries to update or delete the demo user an error will be thrown.

More stuff you can do:

### Set demo mode off

[](#set-demo-mode-off)

Type in terminal:

```
php artisan demo-mode:off

```

### Manually restore the database

[](#manually-restore-the-database)

Type in terminal:

```
php artisan demo-mode:restore

```

### Get demo user

[](#get-demo-user)

```
DemoMode::user();
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Every ~0 days

Total

3

Last Release

1197d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/941c06f4be4c8d953dcbc398591d8726d1f63e4e459bdf30312852d760c4546d?d=identicon)[lpfuri](/maintainers/lpfuri)

---

Top Contributors

[![lpfuri](https://avatars.githubusercontent.com/u/7555043?v=4)](https://github.com/lpfuri "lpfuri (10 commits)")

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)[illuminate/process

The Illuminate Process package.

44869.2k99](/packages/illuminate-process)

PHPackages © 2026

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