Merge pull request #4632 from beganovich/v5-remove-ninja-key-command

(v5) Remove ninja:generate-setup-key command
This commit is contained in:
David Bomba 2021-01-06 08:54:33 +11:00 committed by GitHub
commit 2e3c80500c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,55 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GenerateSetupKey extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ninja:generate-setup-key';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generate random APP_KEY value';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$randomString = base64_encode(\Illuminate\Support\Str::random(32));
$this->info('Success! Copy the following content into your .env or docker-compose.yml:');
$this->warn('base64:' . $randomString);
}
}