public function updataMaintenance(bool $status)
    {
        if ($status) {
            if (!file_exists(route()->root.'maintained')) {
                $fh = fopen(route()->root.'maintained', 'w');
                fwrite($fh, 'maintained');
                fclose($fh);
            }
        } elseif (!$status) {
            if (file_exists(route()->root.'maintained')) {
                unlink(route()->root.'maintained');
            }
        } else {
            return false;
        }
    }
public function updataMaintenance(bool $status)
    {
        if ($status) {
            if (!file_exists(route()->root.'maintained')) {
                $fh = fopen(route()->root.'maintained', 'w');
                fwrite($fh, 'maintained');
                fclose($fh);
            }
        } elseif (!$status) {
            if (file_exists(route()->root.'maintained')) {
                unlink(route()->root.'maintained');
            }
        } else {
            return false;
        }
    }
public function updataMaintenance ( bool $ status ) { if ( $ status ) { if ( ! file_exists ( route ( ) -> root . 'maintained' ) ) { $ fh = fopen ( route ( ) -> root . 'maintained' , 'w' ) ; fwrite ( $ fh , 'maintained' ) ; fclose ( $ fh ) ; } } elseif ( ! $ status ) { if ( file_exists ( route ( ) -> root . 'maintained' ) ) { unlink ( route ( ) -> root . 'maintained' ) ; } } else { return false ; } }
Upgrade the maintaince mode dynamically.

@param (bool) $status

@since 2.0.3

@return void
Upgrade the maintaince mode dynamically .