insert([ 'actor_admin_user_id' => $actorAdminId, 'action' => $action, 'target_type' => $targetType, 'target_id' => $targetId, 'before_json' => $before ? json_encode($before, JSON_UNESCAPED_UNICODE) : null, 'after_json' => $after ? json_encode($after, JSON_UNESCAPED_UNICODE) : null, 'ip' => $ip ?: null, 'user_agent' => $ua ?: null, 'created_at' => now(), ]); } }