This commit is contained in:
itsAzaria
2026-02-18 19:27:33 +00:00
commit f6f1a8f9d4
28 changed files with 9784 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Config extends Model
{
protected $fillable = ['key', 'value'];
public static function get($key, $default = null)
{
$config = self::where('key', $key)->first();
return $config ? $config->value : $default;
}
public static function set($key, $value)
{
return self::updateOrCreate(['key' => $key], ['value' => $value]);
}
}