First Commit
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user