26 lines
408 B
PHP
Executable File
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();
|
|
}
|
|
|
|
|
|
}
|
|
|