forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKeyGenerateCommand.php
More file actions
28 lines (23 loc) · 851 Bytes
/
KeyGenerateCommand.php
File metadata and controls
28 lines (23 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
namespace Pterodactyl\Console\Commands\Overrides;
use Illuminate\Foundation\Console\KeyGenerateCommand as BaseKeyGenerateCommand;
class KeyGenerateCommand extends BaseKeyGenerateCommand
{
/**
* Override the default Laravel key generation command to throw a warning to the user
* if it appears that they have already generated an application encryption key.
*/
public function handle()
{
if (! empty(config('app.key')) && $this->input->isInteractive()) {
$this->output->warning(trans('command/messages.key.warning'));
if (! $this->confirm(trans('command/messages.key.confirm'))) {
return;
}
if (! $this->confirm(trans('command/messages.key.final_confirm'))) {
return;
}
}
parent::handle();
}
}