cvr/under-maintenance-bundle
Composer 安装命令:
composer require cvr/under-maintenance-bundle
包简介
Symfony Bundle for maintenance
README 文档
README
Installation
Install it via composer
composer require cvr/under-maintenance-bundle
Register the bundle
Register bundle into config/bundles.php:
return [ //..... Cvr\UnderMaintenanceBundle\UnderMaintenanceBundle::class => ['all' => true], ];
Usage
Enable maintenance and configure your token in your .env:
###< cvr/under-maintenance-bundle ###
# Maintenance mode (0=disabled and 1=enabled)
MAINTENANCE=1
MAINTENANCE_TOKEN=<your-token>
###< cvr/under-maintenance-bundle ###
Access your site with the maintenance token
http://your-domain?maintenance=<your-token>
Override Maintenance Templates
Create new folder named UnderMaintenanceBundle in your templates/bundles/ application and create new twig template maintenance.html.twig.
Then, don't forget to clear the cache
php bin/console cache:clear
├── bin/
├── config/
├── public/
├── src/
├── templates/
│ └── bundles/
│ └── UnderMaintenanceBundle/
│ └── maintenance.html.twig
├── tests/
├── translations/
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-17