Browse Source

增加$this->timestamps = false;不自动处理时间戳

dev
李可松 4 years ago
parent
commit
00e2371914
  1. 6
      app/Models/UserChannel.php

6
app/Models/UserChannel.php

@ -12,6 +12,12 @@ class UserChannel extends BaseModel
{
use HasFactory;
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->timestamps = false;
}
// 获取时需要转换,写入时框架可自动将数组转换后保存
public function getChannelsAttribute($value)
{

Loading…
Cancel
Save