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

38 lines
1.3 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;
class AppInfoCommand extends Command
{
protected static $defaultName = 'app:info';
protected static $defaultDescription = 'Displays application information';
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln([
'<info>SysCMS - PHP Content Management System</info>',
'========================================',
'',
]);
$output->writeln("PHP Version: " . PHP_VERSION);
$output->writeln("Environment: " . ($_ENV['APP_ENV'] ?? 'production'));
$output->writeln("Debug Mode: " . (($_ENV['APP_DEBUG'] ?? 'false') === 'true' ? 'Enabled' : 'Disabled'));
$output->writeln("URL: " . ($_ENV['APP_URL'] ?? 'Not set'));
$output->writeln([
'',
'<comment>Database:</comment>',
"Connection: " . ($_ENV['DB_CONNECTION'] ?? 'mysql'),
"Host: " . ($_ENV['DB_HOST'] ?? 'localhost'),
"Database: " . ($_ENV['DB_DATABASE'] ?? 'syscms'),
]);
return Command::SUCCESS;
}
}