meat / coming-soon
如果APP_COMINGSOON变量在.env文件中设置为true,则强制显示即将上线页面。
0.1
2016-12-15 16:19 UTC
Requires
- php: ^5.3.3 || ^7.0
This package is not auto-updated.
Last update: 2024-09-14 19:53:13 UTC
README
#MEAT | Laravel 即将上线包
安装
使用composer安装:composer require meat/coming-soon
将服务提供者添加到你的config/app.php
$providers = [ \Meat\ComingSoonServiceProvider::class ... ]
php artisan vendor:publish
编辑你的config\coming-soon.php
在.env
文件中添加APP_COMINGSOON=true
将中间件comingsoon
添加到你想阻止直到上线为止的路由中。
Route::get('coming-soon', function() { return view('coming-soon'); }); Route::group(['middleware' => 'comingsoon'], function() { //All the blocked routes Route::get('/', 'HomeController@home'); ... });