dd/app/Models/ArticleSchema.php
2026-01-22 19:08:25 +08:00

26 lines
408 B
PHP
Executable File

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ArticleSchema extends Model
{
protected $table = 'article_schema';
public function _opt(array $aKv)
{
$aOpt = json_decode($this->opt, true) ?? [];
foreach ($aKv as $k => $v) {
$aOpt[$k] = $v;
}
$this->opt = $aOpt;
$this->save();
}
}