Under Construction Package

Under Construction Package

This Laravel package by Lars Janssen, allows you to put your application in an “Under Construction” mode and then only users with the correct 4 digit code can access your site.

After you install it usage is pretty simple. Register your secret four digit number:

php artisan code:set 1234

Then, add the middleware to a route you want to restrict:

Route::group(['middleware' => 'under-construction'], function () {
    Route::get('/live-site', function() {
        echo 'content!';
    });
});

This is a pretty cool package for those times when you want to share a site with clients and friends and for times when using a local share is not ideal.

For more information check out the GitHub repo.


Filed in: Laravel Packages / Middleware


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Senior Laravel Engineer
Remote okay (must already live in USA)
Hawthorne Effect
Senior Software Engineer (Remote - Contract)
Remote
Koodi Systems
PHP Developer
Pittsburgh / Remote
Sequoia Waste Solutions
Software Developer
Eindhoven
Simac IDS
Application Developer Level II (CakePHP / MySql / Vue.js)
Lancaster, PA
Harbor Compliance
FULL STACK LARAVEL DEVELOPER
LONDON - WEST END
AMPERSAND HEATLH
Mid/Senior Laravel Developer - U.S. Only
Kenner, Louisiana
Profit Miner Technologies