chatbot nuevo

This commit is contained in:
Lizandro Guarnizo
2026-04-30 21:32:32 -05:00
parent 88a42ec629
commit f61e8005fc
24 changed files with 1724 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ChatConfig extends Model
{
protected $table = 'chat_config';
protected $fillable = ['config_key', 'config_value', 'description'];
public static function get(string $key, string $default = ''): string
{
return static::where('config_key', $key)->value('config_value') ?? $default;
}
public static function set(string $key, string $value): void
{
static::updateOrCreate(
['config_key' => $key],
['config_value' => $value]
);
}
}