feat: 复制不关联线站

This commit is contained in:
2026-04-23 08:45:44 +08:00
parent a917338d0c
commit 37dd58eff0

View File

@@ -205,11 +205,6 @@ class GuideResource extends Resource
$newGuide->published_at = null; $newGuide->published_at = null;
$newGuide->save(); $newGuide->save();
// 复制关联的线站
if ($record->stations()->count() > 0) {
$newGuide->stations()->sync($record->stations()->pluck('stations.id'));
}
// 复制页面 // 复制页面
$pageIdMap = []; $pageIdMap = [];
foreach ($record->pages as $page) { foreach ($record->pages as $page) {