File tree Expand file tree Collapse file tree 1 file changed +2
-22
lines changed
Expand file tree Collapse file tree 1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public function saving($model)
3535 */
3636 public function updating ($ model )
3737 {
38- $ this -> updateRelatedContentRoutes ( $ model );
38+ //
3939 }
4040
4141 /**
@@ -76,26 +76,6 @@ protected function clearCached()
7676 */
7777 protected function deleteRelatedModels ($ model )
7878 {
79- $ model ->contentSegments ()->delete ();
80- }
81-
82- /**
83- * @param Language&Model $model
84- * @return void
85- */
86- protected function updateRelatedContentRoutes ($ model )
87- {
88- if (! $ model ->isDirty (['code ' ])) {
89- return ;
90- }
91-
92- $ oldCode = $ model ->getOriginal ('code ' );
93- $ newCode = $ model ->code ;
94-
95- $ contentRouteModel = $ model ->contentSegments ()->getRelated ();
96-
97- $ contentRouteModel ->newQuery ()
98- ->where ('locale ' , $ oldCode )
99- ->update (['locale ' => $ newCode ]);
79+ $ model ->contentRoutes ()->delete ();
10080 }
10181}
You can’t perform that action at this time.
0 commit comments