PHP code example of azmolla / maintenance-mode

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

    

azmolla / maintenance-mode example snippets


protected $middlewareGroups = [
    'web' => [
        // Other middleware
        \Azmolla\MaintenanceMode\Http\Middleware\CheckMaintenanceMode::class,
    ],
];

Route::prefix('admin/maintenance')->middleware(['web', 'auth'])->group(function () {
    Route::get('/', [\Azmolla\MaintenanceMode\Controllers\MaintenanceModeController::class, 'index'])->name('admin.maintenance.index');
    Route::post('/update', [\Azmolla\MaintenanceMode\Controllers\MaintenanceModeController::class, 'update'])->name('admin.maintenance.update');
});
sh
php artisan maintenance-mode:publish
sh
php artisan migrate
sh
php artisan maintenance-mode:publish