We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd18763 commit 5a5dda0Copy full SHA for 5a5dda0
src/Models/Behaviors/HasSlug.php
@@ -175,7 +175,7 @@ public function updateOrNewSlug(array $slugParams): void
175
$this->slugs()->whereKey($oldMatchingSlug->getKey())->update(['active' => $isNowActive]);
176
if ($this->relationLoaded('slugs')) {
177
// Report update to slugs so that getSlug() returns the correct value
178
- $slug = $this->slugs->whereKey($oldMatchingSlug->getKey());
+ $slug = $this->slugs->where($this->slugs()->getModel()->getKeyName(), $oldMatchingSlug->getKey());
179
if ($slug) {
180
$slug->active = $isNowActive;
181
$slug->syncOriginalAttribute('active');
0 commit comments