Monday, 8 October 2018

Server up and down (Maintenance) Mode

Create a route

Route::get('/maintenance_down', 'OptimizeController@maintenance_down');
Route::get('/maintenance_up', 'OptimizeController@maintenance_up');


public function maintenance_down()
    { 
        $ip = \Request::ip();
          Artisan::call('down',['--allow'=>$ip]);
        return back();
    }   
    public function maintenance_up()
    {         
          Artisan::call('up');
        return back();
    }   

No comments:

Post a Comment

Machine Learning - Potato Leaf Disease Prediction

Step 1: import numpy as np import pandas as pd import splitfolders import matplotlib.pyplot as plt import tensorflow as tf from tensorflow i...