use prompts to show table

This commit is contained in:
crazywhalecc 2023-10-31 01:48:57 +08:00
parent e637cce6f2
commit aee040d6a4
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -14,6 +14,8 @@ use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use function Laravel\Prompts\table;
#[AsCommand('dev:extensions', 'Helper command that lists available extension details', ['list-ext'])] #[AsCommand('dev:extensions', 'Helper command that lists available extension details', ['list-ext'])]
class AllExtCommand extends BaseCommand class AllExtCommand extends BaseCommand
{ {
@ -62,7 +64,7 @@ class AllExtCommand extends BaseCommand
if ($data === []) { if ($data === []) {
$style->warning('Unknown extension selected: ' . implode(',', $extensions)); $style->warning('Unknown extension selected: ' . implode(',', $extensions));
} else { } else {
$style->table( table(
['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'], ['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'],
$data $data
); );