getTable(); $sql = 'SHOW TABLE STATUS WHERE 1=1 '; $tablePrefix = config('database.connections.mysql.prefix'); if (!empty($table_name)) { $sql .= "AND name='" .$table_name."'"; } $tables = Db::query($sql); $table_info = $tables[0] ?? []; $table_name = str_replace($tablePrefix, '', $table_info['Name']); return Db::name($table_name)->getFields(); } }