<?php

namespace App\Http\Middleware;

use Closure;

class CheckTimeMaintenance
{
    public function handle($request, Closure $next)
    {
        $time = date('H');
        if($time == 00 || $time == 01 || $time == 02 || $time == 03 || $time == 04 ){
            //abort to maintenance mode
        	abort(501);
        }
        return $next($request);
    }
    
}