src/controllers/RowController.php
public static function listColumn($table) {
		if (is_string($table)) $table = config('center.tables.' . $table);
		$fields = !empty($table->list) ? $table->list : array_keys((array) $table->fields);
		foreach ($fields as $field) {
			if ($table->fields->{$field}->type == 'string') return $field;
		}
	}
public static function listColumn($table) {
		if (is_string($table)) $table = config('center.tables.' . $table);
		$fields = !empty($table->list) ? $table->list : array_keys((array) $table->fields);
		foreach ($fields as $field) {
			if ($table->fields->{$field}->type == 'string') return $field;
		}
	}
public static function listColumn ( $ table ) { if ( is_string ( $ table ) ) $ table = config ( 'center.tables.' . $ table ) ; $ fields = ! empty ( $ table -> list ) ? $ table -> list : array_keys ( ( array ) $ table -> fields ) ; foreach ( $ fields as $ field ) { if ( $ table -> fields -> { $ field } -> type == 'string' ) return $ field ; } }
get the first text field column name
get the first text field column name