PHPackages                             larsjanssen6/underconstruction - 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. larsjanssen6/underconstruction

ActiveLibrary

larsjanssen6/underconstruction
==============================

8.1(4y ago)559192.4k—7%68[3 issues](https://github.com/larsjanssen6/underconstruction/issues)[8 PRs](https://github.com/larsjanssen6/underconstruction/pulls)MITJavaScriptPHP ^7.4|^8.0

Since Oct 8Pushed 2y ago10 watchersCompare

[ Source](https://github.com/larsjanssen6/underconstruction)[ Packagist](https://packagist.org/packages/larsjanssen6/underconstruction)[ Docs](https://github.com/larsjanssen6/underconstruction)[ RSS](/packages/larsjanssen6-underconstruction/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (35)Used By (0)

Laravel Under Construction [![schermafbeelding 2017-09-27 om 23 08 12](https://user-images.githubusercontent.com/7254997/30937972-c9632d04-a3d8-11e7-87f3-c44ce2b86d24.png)](https://user-images.githubusercontent.com/7254997/30937972-c9632d04-a3d8-11e7-87f3-c44ce2b86d24.png)
=================================================================================================================================================================================================================================================================================

[](#laravel-under-construction-)

[![StyleCI](https://camo.githubusercontent.com/d46a55cf3350e176322cff0e8030aa6ffe2200bdf6ba64526b7530979a6163ef/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130343530303136342f736869656c64)](https://styleci.io/repos/104500164)[![Packagist](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)](https://github.com/larsjanssen6/underconstruction/blob/master/LICENSE.md)[![](https://camo.githubusercontent.com/3af6da6c2a6bdfb33360071846379aea48b463bafdee03ed12d6b6b9c281b585/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406c6172736a616e7373652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/larsjansse)[![Total Downloads](https://camo.githubusercontent.com/cfae756d219b4f12c8a7d5c8939bf44f0cb58fe39a07d6d822631661def9c67e/68747470733a2f2f706f7365722e707567782e6f72672f6c6172736a616e7373656e362f756e646572636f6e737472756374696f6e2f646f776e6c6f616473)](https://packagist.org/packages/larsjanssen6/underconstruction)

[![Buy Me A Coffee](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/nFdwPZel9)

This Laravel package makes it possible to set your website in "Under Construction" mode. Only users with the correct 4 digit code can access your site. This package can for example be useful to show your website to a specific client. Everything works out of the box, and it's fully customizable.

**If you appreciate my work please give this repo a star or buy me a coffee ^ 🤗.**

[![underconstruction](https://user-images.githubusercontent.com/7254997/30869205-d96d9962-a2e0-11e7-9044-0a7ff708e6c3.png)](https://user-images.githubusercontent.com/7254997/30869205-d96d9962-a2e0-11e7-9044-0a7ff708e6c3.png)

Installation
------------

[](#installation)

Begin by installing this package through Composer (Laravel 6, 7, 8, 9 and 10 compatible!).

```
composer require larsjanssen6/underconstruction
```

The `\LarsJanssen\UnderConstruction\UnderConstruction::class` middleware must be registered in the kernel:

```
//app/Http/Kernel.php

protected $routeMiddleware = [
  // ...
  'under-construction' => \LarsJanssen\UnderConstruction\UnderConstruction::class,
];
```

### Defaults

[](#defaults)

Publish the default configuration file.

```
php artisan vendor:publish

# Or...

php artisan vendor:publish --provider="LarsJanssen\UnderConstruction\UnderConstructionServiceProvider"
```

This package is fully customizable. This is the content of the published config file `under-construction.php`:

```
