1 | <?php |
||
10 | class EarlyAccess extends Command |
||
11 | { |
||
12 | use InteractsWithTime, InteractsWithEarlyAccess; |
||
13 | |||
14 | /** |
||
15 | * The name and signature of the console command. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $signature = 'early-access |
||
20 | {--a|activate : Activate early access} |
||
21 | {--d|deactivate : Deactivate early access} |
||
22 | {--allow=* : IP or networks allowed to access the application while in early access mode} |
||
23 | {status? : Get the status}'; |
||
24 | |||
25 | /** |
||
26 | * The console command description. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Activate, deactivate, or check if early access mode is enabled.'; |
||
31 | |||
32 | /** |
||
33 | * @var \Illuminate\Contracts\Filesystem\Filesystem |
||
34 | */ |
||
35 | private $storage; |
||
36 | |||
37 | /** |
||
38 | * Create a new command instance. |
||
39 | * |
||
40 | * @param \Illuminate\Contracts\Filesystem\Filesystem $storage |
||
41 | */ |
||
42 | public function __construct(Storage $storage) |
||
48 | |||
49 | /** |
||
50 | * Execute the console command. |
||
51 | * |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function handle() |
||
74 | |||
75 | /** |
||
76 | * Deactivate early access. |
||
77 | */ |
||
78 | protected function activate() |
||
84 | |||
85 | /** |
||
86 | * Activate early access. |
||
87 | */ |
||
88 | protected function deactivate() |
||
98 | |||
99 | /** |
||
100 | * Gets the status of the early access mode. |
||
101 | */ |
||
102 | protected function getStatus() |
||
112 | } |
||
113 |