mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 15:44:45 +02:00

* Fix copy paste AllocationsRelationManager * We shouldn't let the user know if the user is correct but the password isn't * Add missing `trans()` `EditServer` * Add missing `trans()` User `ServersRelationManager` * Replace every `__()` with `trans()` helper * Fix `exceptions` `User` Model * Replace `Translator->get()` with `trans()` helper * Revert "We shouldn't let the user know if the user is correct but the password isn't" This reverts commit e156ee4b38e9e969662a532648c78fdc1e9b0166. that's stock laravel, therefore it needs to stay
29 lines
859 B
PHP
29 lines
859 B
PHP
<?php
|
|
|
|
namespace App\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(): void
|
|
{
|
|
if (!empty(config('app.key')) && $this->input->isInteractive()) {
|
|
$this->output->warning(trans('commands.key_generate.error_already_exist'));
|
|
if (!$this->confirm(trans('commands.key_generate.understand'))) {
|
|
return;
|
|
}
|
|
|
|
if (!$this->confirm(trans('commands.key_generate.continue'))) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
parent::handle();
|
|
}
|
|
}
|