LazyRecord\Command\IndexCommand::displayRows PHP Method

displayRows() protected method

protected displayRows ( array $rows )
$rows array
    protected function displayRows(array $rows)
    {
        if (count($rows)) {
            $table = new Table();
            $headers = array_keys($rows[0]);
            $table->setHeaders($headers);
            foreach ($rows as $row) {
                $table->addRow(array_values($row));
            }
            echo $table->render();
        }
    }