feat: 复制不关联线站
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user