Under Construction Package


February 8th, 2018


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:

1php artisan code:set 1234

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

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

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:

Eric L. Barnes

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Laravel News Partners