src/Relation/BelongsToMany.php 1 location
|
@@ 158-161 (lines=4) @@
|
| 155 |
|
$query->where($this->localKey, $id); |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
if (count($ids) > 0) { |
| 159 |
|
$in = implode(',', $ids); |
| 160 |
|
$query->where("{$this->foreignKey} NOT IN ($in)"); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
$query->delete(); |
| 164 |
|
|
src/Relation/HasMany.php 1 location
|
@@ 100-103 (lines=4) @@
|
| 97 |
|
$model = new $class(); |
| 98 |
|
$query = $model::query(); |
| 99 |
|
|
| 100 |
|
if (count($ids) > 0) { |
| 101 |
|
$in = implode(',', $ids); |
| 102 |
|
$query->where("{$this->foreignKey} NOT IN ($in)"); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
$query->delete(); |
| 106 |
|
|