phplucidframe/console-table
Lightweight PHP library to render formatted ASCII tables in the console. Define headers, rows, alignment, padding, and borders; supports styling and flexible layouts for CLI apps, scripts, and Symfony/Laravel-style console output.
dd() or dump() with formatted tables for debugging or data inspection.new ConsoleTable() in service containers).use PhpLucidiFrame\ConsoleTable\ConsoleTable;
$table = new ConsoleTable();
$table->setHeaders(['ID', 'Name', 'Status']);
$table->addRows(User::all()->map(fn($u) => [$u->id, $u->name, $u->status]));
$table->display();
Table (from illuminate/support) or Symfony’s Console/Helper/TableHelper for feature parity.phpunit/phpunit-screenshot) may be needed for critical CLI tools.echo/var_dump with ConsoleTable for structured output.TelescopeServiceProvider to format query logs as tables.php artisan debug:config).dd($users); // Before
with:
(new ConsoleTable())->setHeaders(['ID', 'Email'])->addRows($users)->display(); // After
ConsoleTable in all new CLI tools (e.g., custom admin commands).var_dump/dd() in favor of structured tables.| Step | Priority | Effort | Dependencies |
|---|---|---|---|
| Install package | High | Low | None |
| Pilot in 1 command | High | Medium | Package installation |
| Update docs | Medium | Low | Pilot results |
| Enforce in new code | Low | Medium | Team buy-in |
| Deprecate old code | Low | High | Full adoption |
config/console-table.php) for consistency.illuminate/support) that may supersede this package.--no-interaction).UTF-8 in terminal).cursor() queries).| Scenario | Impact | Mitigation |
|---|---|---|
| Terminal rendering errors | UX degradation | Fallback to json_encode() output |
| Large table crashes CLI | High | Enforce row limits (e.g., 1000 rows) |
| Package dependency conflicts | Medium | Isolate in composer.json |
| ANSI color unsupported | Low | Provide plain-text fallback |
dd() with ConsoleTable.debug:users command.var_dump usage.How can I help you explore Laravel packages today?