PHP code example of konsulting / laravel-maintenance-mode
1. Go to this page and download the library: Download konsulting/laravel-maintenance-mode 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/ */
konsulting / laravel-maintenance-mode example snippets
class Kernel extends HttpKernel
{
// ...
protected $middleware = [
\Konsulting\Laravel\MaintenanceMode\Middleware\CheckForMaintenanceMode::class,
// You can remove the Illuminate CheckForMaintenanceMode middleware or leave it in
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
// ...
];
}
$driver = new FileDriver(['file_path' => '/path/to/file']);
$maintenanceMode = new MaintenanceMode($driver);