Files
dockerfluxodecaixapro/app/Console/Commands/AppAboutCommand.php
T
2026-09-01 10:46:29 -03:00

41 lines
1.6 KiB
PHP
Executable File

<?php
namespace App\Console\Commands;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\Table;
use Kernel\Application;
class AppAboutCommand extends Command
{
protected static $defaultName = 'app:about';
protected static $defaultDescription = 'Exibe informações detalhadas sobre a aplicação';
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('<info>Sobre a Aplicação SysCMS</info>');
$output->writeln('===========================');
$table = new Table($output);
$table->setHeaders(['Informação', 'Valor']);
$table->addRow(['Nome', $_ENV['APP_NAME'] ?? 'SysCMS']);
$table->addRow(['Versão', '1.0.0']);
$table->addRow(['Ambiente', $_ENV['APP_ENV'] ?? 'local']);
$table->addRow(['Debug', ($_ENV['APP_DEBUG'] ?? 'false') === 'true' ? '<info>Ativo</info>' : '<comment>Inativo</comment>']);
$table->addRow(['URL', $_ENV['APP_URL'] ?? 'http://localhost']);
$table->addRow(['PHP Version', PHP_VERSION]);
$table->addRow(['OS', PHP_OS]);
$table->addRow(['Database', $_ENV['DB_DATABASE'] ?? 'syscms']);
$table->addRow(['Database Driver', $_ENV['DB_CONNECTION'] ?? 'mysql']);
$table->addRow(['Timezone', date_default_timezone_get()]);
$table->addRow(['Locale', $_SESSION['lang'] ?? 'pt_BR']);
$table->render();
return Command::SUCCESS;
}
}