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

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

codezero/laravel-stagefront
===========================

Quickly add some password protection to a staging site.

2.7.0(2y ago)2178.5k↓11.4%5[3 issues](https://github.com/codezero-be/laravel-stagefront/issues)[2 PRs](https://github.com/codezero-be/laravel-stagefront/pulls)MITPHPPHP ^7.1|^8.0CI failing

Since Oct 10Pushed 2y ago3 watchersCompare

[ Source](https://github.com/codezero-be/laravel-stagefront)[ Packagist](https://packagist.org/packages/codezero/laravel-stagefront)[ Fund](https://paypal.me/ivanvermeyen)[ Fund](https://ko-fi.com/ivanvermeyen)[ RSS](/packages/codezero-laravel-stagefront/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (0)

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

[](#laravel-stagefront)

[![GitHub release](https://camo.githubusercontent.com/5f4bce10614f1da6e1ac244dc4e700a9712f8e96f2acfc09eb8024bfb1764f57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636f64657a65726f2d62652f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/codezero-be/laravel-stagefront/releases)[![Laravel](https://camo.githubusercontent.com/6b439d6929b4963e5e873cdf2ac7d587f60c8730be8590e1ae384897cebc6369/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312d7265643f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://laravel.com)[![License](https://camo.githubusercontent.com/a5ad58c15da654156ed68c62e8d4c8dd83a8c76b82d92e2782687368497ebe8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64657a65726f2f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/199a7e0332a05f6b6746129dac791947661f5930d0199422d1279eb37671ecca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f64657a65726f2d62652f6c61726176656c2d737461676566726f6e742f72756e2d74657374732e796d6c3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d7465737473)](https://github.com/codezero-be/laravel-stagefront/actions)[![Code Quality](https://camo.githubusercontent.com/1d44ee7abeeded8cae61c86a64972bc3aab4c58bd30e75f43a36b2d17c18e5e4/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f61356462386131333231363634653637393030633936656164633537356563652f6d61737465723f7374796c653d666c61742d737175617265)](https://app.codacy.com/gh/codezero-be/laravel-stagefront)[![Total Downloads](https://camo.githubusercontent.com/e733419d4cf15f9be2155b23c96070e712b1ef84e43ad7dc24efc784d035cde2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64657a65726f2f6c61726176656c2d737461676566726f6e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codezero/laravel-stagefront)

[![ko-fi](https://camo.githubusercontent.com/1fedf764fa06114b797ee53e7506df10880abed6766f854202d758df1707969d/68747470733a2f2f7777772e6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/R6R3UQ8V)

#### 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 ^7.1 | ^8.0
- [Laravel](https://laravel.com/) &gt;= 5.7

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

[](#-installation)

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

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

```
composer require codezero/laravel-stagefront
```

Laravel will automatically register the [ServiceProvider](https://github.com/codezero-be/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, add it to the `web` middleware group in `app/Http/Kernel.php`, **right after the `StartSession` middleware**:

```
protected $middlewareGroups = [
    'web' => [
        \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 everyting under /jane, but not /jane itself
    '/jane/*',
],
```

#### ☑️ Ignore Domains

[](#️-ignore-domains)

If for any reason you wish to disable StageFront on specific doamins, you can add these to the `ignore_udomains` 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](https://byterider.io/)
- [All contributors](../../contributors)

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

[](#-security)

If you discover any security related issues, please [e-mail me](mailto:ivan@codezero.be) 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/codezero-be/laravel-stagefront/releases).

📜 License
---------

[](#-license)

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

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 94% 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 ~148 days

Recently: every ~197 days

Total

17

Last Release

770d ago

Major Versions

1.1.4 → 2.0.02020-01-01

PHP version history (5 changes)1.0.0PHP &gt;=7.0.0

1.1.4PHP &gt;=7.0

2.0.0PHP &gt;=7.1

2.2.0PHP ^7.1

2.3.1PHP ^7.1|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e17b7a892452367dfb0e5c55bf04844a16bb781f356f50019332d4b9a476ec6?d=identicon)[codezero](/maintainers/codezero)

---

Top Contributors

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

---

Tags

laravelpasswordphpprotectionstaginglaravelpasswordprotectstaging

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[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)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3264.7k](/packages/martbock-laravel-diceware)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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