├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── resources └── views │ └── lock.blade.php ├── routes └── web.php └── src ├── Http ├── Controllers │ └── LockScreenController.php └── Middleware │ └── LockScreen.php ├── LockScreen.php └── LockScreenServiceProvider.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | phpunit.phar 3 | /vendor 4 | composer.phar 5 | composer.lock 6 | *.project 7 | .idea/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jens Segers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Lock screen 2 | ====== 3 | 4 | Add a lock screen page to laravel-admin. 5 | 6 | [中文介绍](https://laravel-admin.org/posts/24) 7 | 8 | ## Screenshots 9 | 10 |  11 | 12 | ## Installation & Configuration 13 | 14 | ```bash 15 | composer require laravel-admin-ext/lock-screen 16 | ``` 17 | 18 | Then add a middleware `admin.lock` to routes configuration in `config/admin.php` 19 | 20 | ```php 21 | 22 | 'route' => [ 23 | 24 | 'prefix' => 'demo', 25 | 26 | 'namespace' => 'App\\Admin\\Controllers', 27 | 28 | // add middleware `admin.lock` into this array. 29 | 'middleware' => ['web', 'admin', 'admin.lock'], 30 | ], 31 | 32 | ``` 33 | 34 | ## Usage 35 | 36 | After installation and configuration, open the admin page, you will find a link in the upper right corner of the page with a lock icon, click it to redirect to the lock screen page, 37 | You need to enter your login password to return to unlock the page. 38 | 39 | ## Donate 40 | 41 | 如果觉得这个项目帮你节约了时间,不妨支持一下;) 42 | 43 |  44 | 45 | License 46 | ------------ 47 | Licensed under [The MIT License (MIT)](LICENSE). 48 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel-admin-ext/lock-screen", 3 | "description": "Lock-screen page for laravel-admin", 4 | "type": "library", 5 | "keywords": ["laravel-admin", "extension", "lock screen"], 6 | "homepage": "https://github.com/laravel-admin-ext/lock-screen", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "z-song", 11 | "email": "zosong@126.com" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=7.0.0", 16 | "encore/laravel-admin": "~1.6" 17 | }, 18 | "require-dev": { 19 | "phpunit/phpunit": "~6.0" 20 | }, 21 | "autoload": { 22 | "psr-4": { 23 | "Encore\\Admin\\LockScreen\\": "src/" 24 | } 25 | }, 26 | "extra": { 27 | "laravel": { 28 | "providers": [ 29 | "Encore\\Admin\\LockScreen\\LockScreenServiceProvider" 30 | ] 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/lock.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |