All Projects → larsjanssen6 → Underconstruction

larsjanssen6 / Underconstruction

Licence: mit
This Laravel 8 package makes it possible for you to set your website in "Under Construction" mode. Only users with the correct 4 (or more) digit code can access your site. 🔥 💥 🔥

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Underconstruction

Vue Cnode
🔥Vue.js打造一个开源的CNode社区。CNode by Vue.js
Stars: ✭ 249 (-54.64%)
Mutual labels:  webpack, vuejs2
Vue Cnodejs
基于vue.js重写Cnodejs.org社区的webapp
Stars: ✭ 3,065 (+458.29%)
Mutual labels:  webpack, vuejs2
Vue Home
🏠 A simple project(Vue Community SPA) which bases on vue+vue-cli+vue-router+axios+ scss.
Stars: ✭ 256 (-53.37%)
Mutual labels:  webpack, vuejs2
Webpack Dev Middleware
A development middleware for webpack
Stars: ✭ 2,336 (+325.5%)
Mutual labels:  webpack, middleware
Neutrino
Create and build modern JavaScript projects with zero initial configuration.
Stars: ✭ 3,844 (+600.18%)
Mutual labels:  webpack, middleware
Nx Admin
👍 A magical 🐮 ⚔ vue admin,记得star
Stars: ✭ 2,497 (+354.83%)
Mutual labels:  webpack, vuejs2
Cadence Web
Web UI for visualizing workflows on Cadence
Stars: ✭ 261 (-52.46%)
Mutual labels:  webpack, vuejs2
Webpack2
基于webpack2和vue.js2构建饿了么多页面应用 🌹
Stars: ✭ 165 (-69.95%)
Mutual labels:  webpack, vuejs2
Miox
Modern infrastructure of complex SPA
Stars: ✭ 374 (-31.88%)
Mutual labels:  webpack, middleware
Vueniverse
Full stack, user based, PWA, Vue template.
Stars: ✭ 339 (-38.25%)
Mutual labels:  webpack, vuejs2
Webpack Hot Middleware
Webpack hot reloading you can attach to your own server
Stars: ✭ 2,279 (+315.12%)
Mutual labels:  webpack, middleware
Koa Webpack
Development and Hot Reload Middleware for Koa2
Stars: ✭ 429 (-21.86%)
Mutual labels:  webpack, middleware
Feathers Vue
A boiler plate template using Feathers with Email Verification, Vue 2 with Server Side Rendering, stylus, scss, jade, babel, webpack, ES 6-8, login form, user authorization, and SEO
Stars: ✭ 195 (-64.48%)
Mutual labels:  webpack, vuejs2
Vue Element Starter
Vue starter with Element-UI [READY, unmaintained now]
Stars: ✭ 216 (-60.66%)
Mutual labels:  webpack, vuejs2
Vue2 Demo
Vue 基于 Genesis + TS + Vuex 实现的 SSR demo
Stars: ✭ 2,072 (+277.41%)
Mutual labels:  webpack, vuejs2
Tui
This is a high quanlity components library for VUE
Stars: ✭ 258 (-53.01%)
Mutual labels:  webpack, vuejs2
Vue Webgulp
Vue.js + Webpack + Gulp + Vue Loader
Stars: ✭ 146 (-73.41%)
Mutual labels:  webpack, vuejs2
Github Ranking
🔍GitHub不同语言热门项目排行,Vue.js做页面展示
Stars: ✭ 160 (-70.86%)
Mutual labels:  webpack, vuejs2
Vue Project
基于vue-cli构建的财务后台管理系统(vue2+vuex+axios+vue-router+element-ui+echarts+websocket+vue-i18n)
Stars: ✭ 301 (-45.17%)
Mutual labels:  webpack, vuejs2
One
基于Spring Boot和Vue2开发的前后端分离的后台管理系统
Stars: ✭ 426 (-22.4%)
Mutual labels:  webpack, vuejs2

Laravel Under Construction schermafbeelding 2017-09-27 om 23 08 12

StyleCI Packagist Total Downloads

Buy Me A Coffee

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

Installation

Begin by installing this package through Composer (Laravel 6, 7 and 8 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

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:

<?php

return [

    /*
     * Activate under construction mode.
     */
    'enabled' => env('UNDER_CONSTRUCTION_ENABLED', true),

    /*
     * Hash for the current pin code
     */
    'hash' => env('UNDER_CONSTRUCTION_HASH', null),

    /*
     * Under construction title.
     */
    'title' => 'Under Construction',

    /*
     * Custom Route Prefix
     * */
    'route-prefix' => env('UNDER_CONSTRUCTION_ROUTE_PREFIX','under'),

    /*
     * Custom Endpoint if you don't want to use 'construction'
     * e.g. if you change to 'checkpoint', the route prefix
     * above will be appended giving you 'under/checkpoint'
     * */
    'custom-endpoint' => env('UNDER_CONSTRUCTION_CUSTOM_ENDPOINT','construction'),


    /*
     * Back button translation.
     */
    'back-button' => 'back',

    /*
    * Show button translation.
    */
    'show-button' => 'show',

    /*
     * Hide button translation.
     */
    'hide-button' => 'hide',

    /*
     * Show loader.
     */
    'show-loader' => true,

    /*
     * Redirect url after a successful login.
     */
    'redirect-url' => '/',

    /*
     * Enable throttle (max login attempts).
     */
    'throttle' => true,

        /*
        |--------------------------------------------------------------------------
        | Throttle settings (only when throttle is true)
        |--------------------------------------------------------------------------
        |
        */

        /*
        * Set the amount of digits (max 6).
        */
        'total_digits' => 4,

        /*
         * Set the maximum number of attempts to allow.
         */
        'max_attempts' => 3,

        /*
         * Show attempts left.
         */
        'show_attempts_left' => true,

        /*
         * Attempts left message.
         */
        'attempts_message' => 'Attempts left: %i',

        /*
         * Too many attempts message.
         */
        'seconds_message' => 'Too many attempts please try again in %i seconds.',

        /*
         * Set the number of minutes to disable login.
         */
        'decay_minutes' => 5,

        /*
         * Prevent the site from being indexed by Robots when locked
         */
        'lock_robots' => true,
];

Usage

You'll have to set a 4 digit code (you can change this up to 6 in config file). You can do that by running this custom artisan command (in this example the code is 1234 ,you can obviously set another code). It will generate a hash that will be stored in your .env file.

php artisan code:set 1234

You can set routes to be in "Under Construction" mode by using the under-construction-middleware on them.

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

Changelog

Please see CHANGELOG for more information on what has changed recently.

Testing

composer test

Contributing

I would love to hear your ideas to improve my codeing style and conventions. Feel free to contribute.

Security

If you discover any security related issues, please email [email protected]. You can also make an issue.

Credits

About me

I'm Lars Janssen from The Netherlands and like to work on web projects. You can follow me on Twitter.

License

The MIT License (MIT). Please see License File for more information.

❤️ Open-Source Software - Give ⭐️

We have included the awesome symfony/thanks composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].