Skip to content

Commit 47e433b

Browse files
authored
allow passing a single string or integer to InteractsWithPivotTable::sync (#55762)
1 parent b85f440 commit 47e433b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function toggle($ids, $touch = true)
6666
/**
6767
* Sync the intermediate tables with a list of IDs without detaching.
6868
*
69-
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
69+
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array|int|string $ids
7070
* @return array{attached: array, detached: array, updated: array}
7171
*/
7272
public function syncWithoutDetaching($ids)
@@ -77,7 +77,7 @@ public function syncWithoutDetaching($ids)
7777
/**
7878
* Sync the intermediate tables with a list of IDs or collection of models.
7979
*
80-
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
80+
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array|int|string $ids
8181
* @param bool $detaching
8282
* @return array{attached: array, detached: array, updated: array}
8383
*/
@@ -130,7 +130,7 @@ public function sync($ids, $detaching = true)
130130
/**
131131
* Sync the intermediate tables with a list of IDs or collection of models with the given pivot values.
132132
*
133-
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array $ids
133+
* @param \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Model|array|int|string $ids
134134
* @param array $values
135135
* @param bool $detaching
136136
* @return array{attached: array, detached: array, updated: array}

0 commit comments

Comments
 (0)