File tree 1 file changed +1
-24
lines changed
1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change 17
17
use function array_values ;
18
18
use function assert ;
19
19
use function count ;
20
- use function is_array ;
21
20
use function is_numeric ;
22
21
23
22
class BelongsToMany extends EloquentBelongsToMany
@@ -132,7 +131,7 @@ public function sync($ids, $detaching = true)
132
131
$ current = $ ids ->modelKeys ();
133
132
}
134
133
135
- $ records = $ this ->formatSyncList ($ ids );
134
+ $ records = $ this ->formatRecordsList ($ ids );
136
135
137
136
$ current = Arr::wrap ($ current );
138
137
@@ -299,28 +298,6 @@ public function getQualifiedRelatedPivotKeyName()
299
298
return $ this ->relatedPivotKey ;
300
299
}
301
300
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
-
324
301
/**
325
302
* Get the name of the "where in" method for eager loading.
326
303
*
You can’t perform that action at this time.
0 commit comments