public function primaryKeys($table)
{
$tableSchema = $table;
if (!$table instanceof Table) {
$tableSchema = $this->schema($table);
}
$primaryKeys = [];
$tablePrimaryKeys = $tableSchema->primaryKey();
foreach ($tableSchema->columns() as $column) {
if (in_array($column, $tablePrimaryKeys)) {
$primaryKeys[] = ['name' => $column, 'info' => $this->column($tableSchema, $column)];
}
}
return $primaryKeys;
}