src/Relation/BelongsToMany.php 1 location
|
@@ 192-195 (lines=4) @@
|
| 189 |
|
$query->where($this->localKey, $id); |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
if (count($ids) > 0) { |
| 193 |
|
$in = implode(',', $ids); |
| 194 |
|
$query->where("{$this->foreignKey} NOT IN ($in)"); |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
$query->delete(); |
| 198 |
|
|
src/Relation/HasMany.php 1 location
|
@@ 130-133 (lines=4) @@
|
| 127 |
|
$model = new $class(); |
| 128 |
|
$query = $model::query(); |
| 129 |
|
|
| 130 |
|
if (count($ids) > 0) { |
| 131 |
|
$in = implode(',', $ids); |
| 132 |
|
$query->where("{$this->foreignKey} NOT IN ($in)"); |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
$query->delete(); |
| 136 |
|
|