public function update_position_field($table, $data = array())
{
$i = 0;
if (is_array($data)) {
foreach ($data as $value) {
$value = intval($value);
if ($value != 0) {
DB::table($table)->whereId($value)->update(['position' => $i]);
}
++$i;
}
}
$cache_group = $this->assoc_table_name($table);
$this->app->cache_manager->delete($cache_group);
}