Currently i am using Laravel5. My question is if if i use the Maintenance mode with
php artisan down
how can say \"the application is down for
In Laravel 5 you have to create your own middleware. Create a file in app/Http/Middleware/CheckForMaintenanceMode.php You can choose of course any filename.
app = $app;
}
public function handle(Request $request, Closure $next)
{
if ($this->app->isDownForMaintenance() &&
!in_array($request->getClientIp(), ['8.8.8.8', '8.8.4.4']))
{
$maintenanceMode = new MaintenanceMode($this->app);
return $maintenanceMode->handle($request, $next);
}
return $next($request);
}
}
In your app/Http/Kernel.php change
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode'
to
'App\Http\Middleware\CheckForMaintenanceMode'