'json', 'new_values' => 'json', ]; protected $table = 'admin_operation_log'; protected $hidden = [ 'updated_at' ]; /** * @return string[] */ #[ArrayShape([ 'login' => "string", 'logout' => "string", 'create' => "string", 'update' => "string", 'delete' => "string" ])] public static function getActionArr(): array { return [ 'login' => __('admin.login'), 'logout' => __('admin.logout'), 'create' => __('admin.new'), 'update' => __('admin.edit'), 'delete' => __('admin.delete') ]; } /** * 获取关联的模型 */ public function model() { return $this->morphTo(); } public function getCreatedAtAttribute($value): string { return get_datetime('datetime', strtotime($value)); } }