File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change 1717use function array_values ;
1818use function assert ;
1919use function count ;
20- use function is_array ;
2120use function is_numeric ;
2221
2322class BelongsToMany extends EloquentBelongsToMany
@@ -132,7 +131,7 @@ public function sync($ids, $detaching = true)
132131 $ current = $ ids ->modelKeys ();
133132 }
134133
135- $ records = $ this ->formatSyncList ($ ids );
134+ $ records = $ this ->formatRecordsList ($ ids );
136135
137136 $ current = Arr::wrap ($ current );
138137
@@ -299,28 +298,6 @@ public function getQualifiedRelatedPivotKeyName()
299298 return $ this ->relatedPivotKey ;
300299 }
301300
302- /**
303- * Format the sync list so that it is keyed by ID. (Legacy Support)
304- * The original function has been renamed to formatRecordsList since Laravel 5.3.
305- *
306- * @deprecated
307- *
308- * @return array
309- */
310- protected function formatSyncList (array $ records )
311- {
312- $ results = [];
313- foreach ($ records as $ id => $ attributes ) {
314- if (! is_array ($ attributes )) {
315- [$ id , $ attributes ] = [$ attributes , []];
316- }
317-
318- $ results [$ id ] = $ attributes ;
319- }
320-
321- return $ results ;
322- }
323-
324301 /**
325302 * Get the name of the "where in" method for eager loading.
326303 *
You can’t perform that action at this time.
0 commit comments