public function indexes($table)
{
$tableSchema = $table;
if (!$table instanceof Table) {
$tableSchema = $this->schema($table);
}
$tableIndexes = $tableSchema->indexes();
$indexes = [];
if (!empty($tableIndexes)) {
foreach ($tableIndexes as $name) {
$indexes[$name] = $tableSchema->index($name);
}
}
return $indexes;
}