-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStatusCommand.php
More file actions
36 lines (27 loc) · 1.16 KB
/
Copy pathStatusCommand.php
File metadata and controls
36 lines (27 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
declare(strict_types=1);
namespace Micilini\PhpSockets\Laravel\Commands;
use Illuminate\Console\Command;
use Micilini\PhpSockets\Laravel\PhpSocketsManager;
final class StatusCommand extends Command
{
protected $signature = 'phpsockets:status';
protected $description = 'Show PHPSockets Laravel configuration status.';
public function handle(PhpSocketsManager $manager): int
{
$serverConfig = $manager->serverConfig();
$chatConfig = $manager->chatConfig();
$this->components->info('PHPSockets is installed.');
$this->table(['Option', 'Value'], [
['Host', $serverConfig->host],
['Port', (string) $serverConfig->port],
['Max payload bytes', (string) $serverConfig->maxPayloadBytes],
['Connection limit', (string) $serverConfig->connectionLimit],
['Debug logs', $serverConfig->enableDebugLogs ? 'yes' : 'no'],
['History limit', (string) $chatConfig->historyLimit],
['Max attachment bytes', (string) $chatConfig->maxAttachmentBytes],
['Storage driver', $manager->storageDriver()],
]);
return self::SUCCESS;
}
}