PHP code example of saicosys / cakephp-maintenance

1. Go to this page and download the library: Download saicosys/cakephp-maintenance 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/ */

    

saicosys / cakephp-maintenance example snippets


return [
    'maintenance' => [
        'enabled' => true, // Enable or disable maintenance mode
        'view' => [
            'layout' => 'default.php',
            'template' => null,
        ],
        'variables' => [
            'logo' => 'logo.png',
            'alt' => 'Company',
            'title' => 'System Maintenance',
            'message' => 'We are upgrading our systems. Please try again later.'
        ],
        'allowedIPs' => ['127.0.0.1', '::1'],
        'statusCode' => 503,
        'retryAfter' => 3600
    ],
];
bash
cp vendor/Saicosys/Maintenance/config/maintenance.example.php config/maintenance.php