fix all issues

This commit is contained in:
root
2026-03-24 01:02:36 -04:00
parent 0f8a1fa0b1
commit 58445b2a48
19 changed files with 674 additions and 167 deletions
+6 -4
View File
@@ -22,11 +22,13 @@ class ConfigurationModel extends Model
*/
public function getConfigValueByKey(string $key)
{
// Deterministic read in case historical duplicates exist
$result = $this->where('config_key', $key)
// Use a fresh builder to avoid stale state from shared model builder.
$builder = $this->db->table($this->table);
$result = $builder->where('config_key', $key)
->orderBy('id', 'DESC')
->first();
return $result ? $result['config_value'] : null;
->get(1)
->getRowArray();
return $result['config_value'] ?? null;
}
/**