Files
panel-pelican-dev/app/Console/Commands/Environment/AppSettingsCommand.php

33 lines
815 B
PHP
Raw Normal View History

2017-09-22 21:19:57 -05:00
<?php
2024-03-12 22:39:16 -04:00
namespace App\Console\Commands\Environment;
2017-09-22 21:19:57 -05:00
use Illuminate\Console\Command;
class AppSettingsCommand extends Command
{
protected $description = 'Configure basic environment settings for the Panel.';
protected $signature = 'p:environment:setup';
2017-09-22 21:19:57 -05:00
public function handle(): void
2017-09-22 21:19:57 -05:00
{
2024-05-07 21:52:51 -04:00
$path = base_path('.env');
if (!file_exists($path)) {
$this->comment('Copying example .env file');
2024-05-07 21:52:51 -04:00
copy($path . '.example', $path);
}
if (!config('app.key')) {
$this->comment('Generating app key');
$this->call('key:generate');
}
2024-10-12 10:58:18 -04:00
$this->comment('Creating storage link');
$this->call('storage:link');
$this->comment('Caching components & icons');
$this->call('filament:optimize');
2017-09-22 21:19:57 -05:00
}
}