1. Go to this page and download the library: Download havokinspiration/wrench 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/ */
havokinspiration / wrench example snippets
Plugin::load('Wrench');
use Wrench\Middleware\MaintenanceMiddleware;
// ...
public function middleware($middleware)
{
$middleware->add(new MaintenanceMiddleware());
// Other middleware configuration
return $middleware;
}
Configure::write('Wrench.enable', true);
$middleware->add(new MaintenanceMiddleware([
'mode' => [
'className' => 'Full\Namespace\To\Mode',
'config' => [
// Specific configuration parameters for the Mode
]
]
]);