mesavolt/five-oh-three
最新稳定版本:v2.2.3
Composer 安装命令:
composer require mesavolt/five-oh-three
包简介
Maintenance page, pretty and simple.
关键字:
README 文档
README
Easy to setup maintenance page.
Installation
composer require mesavolt/five-oh-three
Usage
In your app's entry point (something like public/app.php or web/app.php),
add these lines before the code that should only run if the lock file is not present :
<?php // replace the `use` line with this if you don't use Composer's autoloader // require __DIR__.'/../vendor/mesavolt/five-oh-three/src/LockGuard.php'; use Mesavolt\FiveOhThree\LockGuard; LockGuard::checkAndRender();
Before deploying your application, create a deploying.lock file in your project's root directory. Remove it once your app can go live:
# deploy-my-project.sh # Create the lock file touch deploying.lock # Here goes your usual deployment steps export SYMFONY_ENV=prod composer -n --ansi --no-dev install --optimize-autoloader bin/console --ansi -n --env=prod cache:clear --no-warmup # ... # Remove the lock file rm deploying.lock
Customization
<?php use Mesavolt\FiveOhThree\LockGuard; LockGuard::checkAndRender([ 'lock_path' => __DIR__.'/../estoy-deployin.lock', // path to lock file 'template' => __DIR__.'/res/deploying.html', // path to custom template (can either be a PHP or HTML file) // when using the default template: 'auto_refresh' => false, // you can disable the auto-refresh... 'auto_refresh_interval' => 30, // ... or customize its interval 'icon' => 'http://bestanimations.com/Site/Construction/under-construction-animated-gif-8.gif', ]);
Testing
# run this once when you clone the project composer install # run this before every test to make sure vendor/autoload.php exists and is up-to-date, # especially if you changed some namespaces composer dump-autoload # launch the test suite ./vendor/bin/phpunit
统计信息
- 总下载量: 8.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-07