PATH:
home
/
centosnipponia
/
public_html
/
apptt
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Console
<?php namespace Illuminate\Foundation\Console; use Exception; use Illuminate\Console\Command; use Illuminate\Support\InteractsWithTime; class DownCommand extends Command { use InteractsWithTime; /** * The console command signature. * * @var string */ protected $signature = 'down {--message= : The message for the maintenance mode} {--retry= : The number of seconds after which the request may be retried} {--allow=* : IP or networks allowed to access the application while in maintenance mode}'; /** * The console command description. * * @var string */ protected $description = 'Put the application into maintenance mode'; /** * Execute the console command. * * @return int */ public function handle() { try { if (file_exists(storage_path('framework/down'))) { $this->comment('Application is already down.'); return true; } file_put_contents(storage_path('framework/down'), json_encode($this->getDownFilePayload(), JSON_PRETTY_PRINT)); $this->comment('Application is now in maintenance mode.'); } catch (Exception $e) { $this->error('Failed to enter maintenance mode.'); $this->error($e->getMessage()); return 1; } } /** * Get the payload to be placed in the "down" file. * * @return array */ protected function getDownFilePayload() { return [ 'time' => $this->currentTime(), 'message' => $this->option('message'), 'retry' => $this->getRetryTime(), 'allowed' => $this->option('allow'), ]; } /** * Get the number of seconds the client should wait before retrying their request. * * @return int|null */ protected function getRetryTime() { $retry = $this->option('retry'); return is_numeric($retry) && $retry > 0 ? (int) $retry : null; } }
[+]
..
[-] CastMakeCommand.php
[edit]
[-] ChannelMakeCommand.php
[edit]
[-] ClearCompiledCommand.php
[edit]
[-] ClosureCommand.php
[edit]
[-] ComponentMakeCommand.php
[edit]
[-] ConfigCacheCommand.php
[edit]
[-] ConfigClearCommand.php
[edit]
[-] ConsoleMakeCommand.php
[edit]
[-] DownCommand.php
[edit]
[-] EnvironmentCommand.php
[edit]
[-] EventCacheCommand.php
[edit]
[-] EventClearCommand.php
[edit]
[-] EventGenerateCommand.php
[edit]
[-] EventListCommand.php
[edit]
[-] EventMakeCommand.php
[edit]
[-] ExceptionMakeCommand.php
[edit]
[-] JobMakeCommand.php
[edit]
[-] Kernel.php
[edit]
[-] KeyGenerateCommand.php
[edit]
[-] ListenerMakeCommand.php
[edit]
[-] MailMakeCommand.php
[edit]
[-] ModelMakeCommand.php
[edit]
[-] NotificationMakeCommand.php
[edit]
[-] ObserverMakeCommand.php
[edit]
[-] OptimizeClearCommand.php
[edit]
[-] OptimizeCommand.php
[edit]
[-] PackageDiscoverCommand.php
[edit]
[-] PolicyMakeCommand.php
[edit]
[-] ProviderMakeCommand.php
[edit]
[-] QueuedCommand.php
[edit]
[-] RequestMakeCommand.php
[edit]
[-] ResourceMakeCommand.php
[edit]
[-] RouteCacheCommand.php
[edit]
[-] RouteClearCommand.php
[edit]
[-] RouteListCommand.php
[edit]
[-] RuleMakeCommand.php
[edit]
[-] ServeCommand.php
[edit]
[-] StorageLinkCommand.php
[edit]
[-] StubPublishCommand.php
[edit]
[-] TestMakeCommand.php
[edit]
[-] UpCommand.php
[edit]
[-] VendorPublishCommand.php
[edit]
[-] ViewCacheCommand.php
[edit]
[-] ViewClearCommand.php
[edit]
[+]
stubs
[-] .htaccess.disabled
[edit]