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. jamesking56/laravel-stagefront

ActiveLibrary

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

Quickly add some password protection to a staging site.

2.9.0(1y ago)12.9k↓92.8%MITPHPPHP ^7.1|^8.0CI passing

Since Mar 24Pushed 1y 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 1mo ago

READMEChangelog (2)Dependencies (4)Versions (4)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/6b439d6929b4963e5e873cdf2ac7d587f60c8730be8590e1ae384897cebc6369/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312d7265643f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](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)[![Code Quality](https://camo.githubusercontent.com/1d44ee7abeeded8cae61c86a64972bc3aab4c58bd30e75f43a36b2d17c18e5e4/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f61356462386131333231363634653637393030633936656164633537356563652f6d61737465723f7374796c653d666c61742d737175617265)](https://app.codacy.com/gh/jamesking56/laravel-stagefront)[![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.2
- [Laravel](https://laravel.com/) &gt;= 11

📦 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

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.8% 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 ~2 days

Total

2

Last Release

412d ago

### 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 (11 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

[codezero/laravel-stagefront

Quickly add some password protection to a staging site.

2178.5k](/packages/codezero-laravel-stagefront)[auth0/login

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

2745.0M3](/packages/auth0-login)[schuppo/password-strength

This package provides a validator for ensuring strong passwords in Laravel 4 applications.

1432.7M1](/packages/schuppo-password-strength)[mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

863.4M2](/packages/mikemclin-laravel-wp-password)

PHPackages © 2026

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