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.
0 comments:
Post a Comment
Thanks