Skip to content
This repository has been archived by the owner on Jan 10, 2019. It is now read-only.

👍 A CakePHP Plugin to enable and disable maintenance mode

License

Notifications You must be signed in to change notification settings

lemonphp/cakeplugin-maintenance-mode

Repository files navigation

Introduction

Build Status Coverage Status

A plugin to enable and disable maintenance mode for CakePHP

Main features

  • Show a page to alert application in maintenance mode
  • Allow customize maintenance alert page template
  • 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

  • php >=5.5.9
  • cakephp 3.x

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require lemonphp/cakeplugin-maintenance-mode

Usage

Enable plugin

Add this line to config/bootstrap.php file

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:

  • 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

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.

Fork the project, create a feature branch, and send a pull request.

To ensure a consistent code base, you should make sure the code follows the PSR-2.

If you would like to help take a look at the list of issues.

License

This project is released under the MIT License. Copyright © 2015-2016 LemonPHP Team.

About

👍 A CakePHP Plugin to enable and disable maintenance mode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages