<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
class BaseModel extends Model
{
    // 指定 LogsActivity 记录
    use LogsActivity;
    protected static $logName = 'Model';
    protected static $logAttributes = ['*'];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}
