PHPackages                             jamesking56/laravel-stagefront - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. jamesking56/laravel-stagefront

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

jamesking56/laravel-stagefront
==============================

Quickly add some password protection to a staging site.

3.0.0(1mo ago)14.5k↑591.7%[1 issues](https://github.com/Jamesking56/laravel-stagefront/issues)MITPHPPHP ^8.4CI passing

Since Mar 24Pushed 1mo agoCompare

[ Source](https://github.com/Jamesking56/laravel-stagefront)[ Packagist](https://packagist.org/packages/jamesking56/laravel-stagefront)[ RSS](/packages/jamesking56-laravel-stagefront/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (8)Versions (13)Used By (0)

Laravel StageFront
==================

[](#laravel-stagefront)

[![GitHub release](https://camo.githubusercontent.com/94f67bc3aeaeed7eda00bdb51a842931587891b74cfec0e2a1719e2b1648e2a5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a616d65736b696e6735362f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/jamesking56/laravel-stagefront/releases)[![Laravel](https://camo.githubusercontent.com/50a632fed10f91ccd009337654743ad6ba9321cdcd796352dca02b3c296fc702/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31322d7265643f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com)[![Laravel](https://camo.githubusercontent.com/22a9cba0109ed03b43979b14e29f4aca08931b4ece9609ced209dbd89cccb899/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31332d7265643f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com)[![License](https://camo.githubusercontent.com/2ebb2bede2bb8cfe4960145686ec95cd1e799747381a1c1e7daa793cf34dc0d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a616d65736b696e6735362f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/048a5b526c9afee02d4e3a4de9f740008b930ce106156098fe565a5227146e29/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a616d65736b696e6735362f6c61726176656c2d737461676566726f6e742f72756e2d74657374732e796d6c3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d7465737473)](https://github.com/jamesking56/laravel-stagefront/actions)[![Total Downloads](https://camo.githubusercontent.com/2318a8f1d1df02b1fa661b5f5ad3d3a47caf492c18a6c881166430cb58a14eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616d65736b696e6735362f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codezero/laravel-stagefront)

### RIP Ivan Vermeyen: thank you for your fantastic work

[](#rip-ivan-vermeyen-thank-you-for-your-fantastic-work)

#### Quickly add password protection to a staging site.

[](#quickly-add-password-protection-to-a-staging-site)

Shielding a staging or demo website from the public usually involves setting op authentication separate from the actual project. This isn't always easy or is cumbersome at the least.

It doesn't have to be!

By installing StageFront with composer, adding the middleware and setting 3 variables in your `.env` file you are ready to go. As you will discover below, you also have a bunch more options available.

[![Login Screen](screenshots/screenshot-login.png)](screenshots/screenshot-login.png)

✅ Requirements
--------------

[](#-requirements)

- PHP ^8.4
- [Laravel](https://laravel.com/) &gt;= 12

📦 Installation
--------------

[](#-installation)

#### ☑️ Require the package via Composer:

[](#️-require-the-package-via-composer)

```
composer require jamesking56/laravel-stagefront
```

Laravel will automatically register the [ServiceProvider](https://github.com/jamesking56/laravel-stagefront/blob/master/src/StageFrontServiceProvider.php) and routes.

When StageFront is disabled, its routes will not be registered.

#### ☑️ Install Middleware

[](#️-install-middleware)

To activate the middleware, you need to add the middleware to the `$middlewarePriority` array in `app/Http/Kernel.php`, **right after the `StartSession` middleware**.

```
protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class, // is(config('stagefront.url')))
    @include('stagefront::429')
@else
    @include('your.partial.view')
@endif
```

Text in this view can be changed via the [translation files](#-translations-and-views).

[![Throttle Screen](screenshots/screenshot-throttled.png)](screenshots/screenshot-throttled.png)

#### ☑️ Ignore URLs

[](#️-ignore-urls)

If for any reason you wish to disable StageFront on specific routes, you can add these to the `ignore_urls` array in the [configuration file](#-publish-configuration-file). You can use wildcards if needed. You can't set this in the `.env` file.

For example:

```
'ignore_urls' => [
    // ignores /john, but noting under /john
    '/john',
    // ignores everything under /jane, but not /jane itself
    '/jane/*',
],
```

#### ☑️ Ignore Domains

[](#️-ignore-domains)

If for any reason you wish to disable StageFront on specific domains, you can add these to the `ignore_domains` array in the [configuration file](#-publish-configuration-file). You can't set this in the `.env` file.

For example:

```
'ignore_domains' => [
    'admin.domain.com',
],
```

#### ☑️ Link Live Site

[](#️-link-live-site)

If you set the URL to your live site, a link will be shown underneath the login form.

OptionTypeDefault`STAGEFRONT_LIVE_SITE``string``null`Make sure you enter the full URL, including `https://`.

#### ☑️ Change App Name

[](#️-change-app-name)

By default, the app name that is configured in `config/app.php` is shown as a title on the login and throttle page. You can use a different title by setting this option:

OptionTypeDefault`STAGEFRONT_APP_NAME``string``config('app.name')`📇 Publish Configuration File
----------------------------

[](#-publish-configuration-file)

You can also publish the configuration file.

```
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="config"
```

Each option is documented.

📑 Translations and Views
------------------------

[](#-translations-and-views)

You can publish the translations to quickly adjust the text on the login screen and the errors.

```
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="lang"
```

If you want to customize the login page entirely, you can also publish the view.

```
php artisan vendor:publish --provider="CodeZero\StageFront\StageFrontServiceProvider" --tag="views"
```

> Extra translations are always welcome. :)

📏 Laravel Debugbar
------------------

[](#-laravel-debugbar)

Laravel Debugbar will be disabled on the StageFront routes automatically if you use it in your project. This will hide any potential sensitive data from the public, if by accident Debugbar is running on your staging site. You can disable this feature by editing the `middleware` option in the [configuration file](#-publish-configuration-file).

🚧 Testing
---------

[](#-testing)

```
composer test
```

☕️ Credits
----------

[](#️-credits)

- [Ivan Vermeyen (RIP)](https://byterider.io/)
- [James King](https://jamesking.dev/)
- [All contributors](../../contributors)

🔓 Security
----------

[](#-security)

If you discover any security-related issues, please [e-mail me](mailto:james@jamesking.dev) instead of using the issue tracker.

📑 Changelog
-----------

[](#-changelog)

A complete list of all notable changes to this package can be found on the [releases page](https://github.com/jamesking56/laravel-stagefront/releases).

📜 License
---------

[](#-license)

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

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance70

Regular maintenance activity

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.6% 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 ~204 days

Total

3

Last Release

51d ago

Major Versions

2.9.0 → 3.0.02026-05-06

PHP version history (2 changes)2.8.0PHP ^7.1|^8.0

3.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/93c418e71a3736991017c8204bac2e920bf9c53fa2b278786f7c908d5b5d9c48?d=identicon)[Jamesking56](/maintainers/Jamesking56)

---

Top Contributors

[![ivanvermeyen](https://avatars.githubusercontent.com/u/3598622?v=4)](https://github.com/ivanvermeyen "ivanvermeyen (78 commits)")[![Jamesking56](https://avatars.githubusercontent.com/u/253237?v=4)](https://github.com/Jamesking56 "Jamesking56 (25 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (3 commits)")[![AlexisSerneels](https://avatars.githubusercontent.com/u/287688?v=4)](https://github.com/AlexisSerneels "AlexisSerneels (2 commits)")[![Pezhvak](https://avatars.githubusercontent.com/u/3134479?v=4)](https://github.com/Pezhvak "Pezhvak (1 commits)")

---

Tags

laravelpasswordprotectstaging

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jamesking56-laravel-stagefront/health.svg)

```
[![Health](https://phpackages.com/badges/jamesking56-laravel-stagefront/health.svg)](https://phpackages.com/packages/jamesking56-laravel-stagefront)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5742.2M17](/packages/directorytree-ldaprecord-laravel)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.2M3](/packages/auth0-login)[codezero/laravel-stagefront

Quickly add some password protection to a staging site.

2186.2k](/packages/codezero-laravel-stagefront)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6753.6k5](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1542.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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