'decimal:4', ]; } public function updatedBy(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); } public static function get(string $key, $default = null) { $setting = static::where('key', $key)->first(); return $setting ? $setting->value : $default; } public static function set(string $key, $value, ?string $description = null, ?int $updatedBy = null): void { static::updateOrCreate( ['key' => $key], [ 'value' => $value, 'description' => $description, 'updated_by' => $updatedBy, ] ); } }