mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 21:04:44 +02:00
33 lines
815 B
PHP
33 lines
815 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands\Environment;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
class AppSettingsCommand extends Command
|
|
{
|
|
protected $description = 'Configure basic environment settings for the Panel.';
|
|
|
|
protected $signature = 'p:environment:setup';
|
|
|
|
public function handle(): void
|
|
{
|
|
$path = base_path('.env');
|
|
if (!file_exists($path)) {
|
|
$this->comment('Copying example .env file');
|
|
copy($path . '.example', $path);
|
|
}
|
|
|
|
if (!config('app.key')) {
|
|
$this->comment('Generating app key');
|
|
$this->call('key:generate');
|
|
}
|
|
|
|
$this->comment('Creating storage link');
|
|
$this->call('storage:link');
|
|
|
|
$this->comment('Caching components & icons');
|
|
$this->call('filament:optimize');
|
|
}
|
|
}
|