Introduction
, (*1)
A plugin to enable and disable maintenance mode for CakePHP, (*2)
Main features
- [x] Show a page to alert application in maintenance mode
- [x] Allow customize maintenance alert page template
- [x] Allow enable and disable maintenance mode by shell
- [ ] Allow enable and disable maintenance mode by post request
- [ ] Allow access from some IPs when enabled maintenance mode
- [ ] Allow access some URLs when enabled maintenance mode
- [ ] 100% code coverage
- [ ] Support both CakePHP 3.x and 2.x
Requirements
Installation
You can install this plugin into your CakePHP application using composer., (*3)
The recommended way to install composer packages is:, (*4)
composer require lemonphp/cakeplugin-maintenance-mode
Usage
Enable plugin
Add this line to config/bootstrap.php
file, (*5)
Plugin::load('Lemon/CakePlugin/MaintenanceMode', ['bootstrap' => true]);
Enable maintenance mode
$ bin/cake maintenance_mode enable
Using option --force
to enable maintenance mode with default config:, (*6)
- View class:
\App\View\AppView
- Templatce:
Pages/maintenance.ctp
- Layout:
default
- Time: a hour from now
Disable maintenance mode
$ bin/cake maintenance_mode disable
Changelog
See all change logs in CHANGELOG.md, (*7)
Contributing
All code contributions must go through a pull request and approved by
a core developer before being merged. This is to ensure proper review of all the code., (*8)
Fork the project, create a feature branch, and send a pull request., (*9)
To ensure a consistent code base, you should make sure the code follows the PSR-2., (*10)
If you would like to help take a look at the list of issues., (*11)
License
This project is released under the MIT License.
Copyright © 2015-2016 LemonPHP Team., (*12)