Skip to content

Commit 239cb2f

Browse files
authored
Merge pull request #107 from stueynet/laravel-5
Replace ->lists() with ->pluck()
2 parents 214f604 + 1691c39 commit 239cb2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Taggable.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function scopeWithAllTags($query, $tagNames)
187187
foreach($tagNames as $tagSlug) {
188188
$tags = Tagged::where('tag_slug', call_user_func($normalizer, $tagSlug))
189189
->where('taggable_type', $className)
190-
->lists('taggable_id');
190+
->pluck('taggable_id');
191191

192192
$primaryKey = $this->getKeyName();
193193
$query->whereIn($this->getTable().'.'.$primaryKey, $tags);
@@ -218,7 +218,7 @@ public function scopeWithAnyTag($query, $tagNames)
218218

219219
$tags = Tagged::whereIn('tag_slug', $tagNames)
220220
->where('taggable_type', $className)
221-
->lists('taggable_id');
221+
->pluck('taggable_id');
222222

223223
$primaryKey = $this->getKeyName();
224224
return $query->whereIn($this->getTable().'.'.$primaryKey, $tags);

0 commit comments

Comments
 (0)