PHP code example of codeigniterext / maintenancemode

1. Go to this page and download the library: Download codeigniterext/maintenancemode library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codeigniterext / maintenancemode example snippets


Events::on('post_controller_constructor', 'CodeigniterExt\MaintenanceMode\Controllers\MaintenanceMode::check');
...

public $aliases = [
    'maintenancemode' => \CodeigniterExt\MaintenanceMode\Filters\MaintenanceMode::class,
    ...
]

public $globals = [
    'before' => [
        'maintenancemode',
        ...
    ],
    'after'  => [
        ...
    ],
];
shell
$ php spark mm:publish
$ php spark mm:down
$ php spark mm:status
$ php spark mm:up
shell
$ php spark mm:publish