Skip to content

Commit

Permalink
Update src/Storage/EntryModel.php
Browse files Browse the repository at this point in the history
Co-authored-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
taylorotwell and crynobone authored Aug 1, 2023
1 parent c20d92b commit c20f4f9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Storage/EntryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@ protected function whereTag($query, EntryQueryOptions $options)
}

return $query->whereIn('uuid', function ($query) use ($tags) {
$query->select('entry_uuid')->from('telescope_entries_tags');
foreach ($tags as $tag) {
$query->whereIn('entry_uuid', function ($query) use ($tag) {
$query->select('entry_uuid')->from('telescope_entries_tags')->where('tag', trim($tag));
$query->select('entry_uuid')->from('telescope_entries_tags')
->whereIn('entry_uuid', function ($query) use ($tags) {
$query->select('entry_uuid')->from('telescope_entries_tags')->whereIn('tag', $tags->all());
});
}
});
});

Expand Down

0 comments on commit c20f4f9

Please sign in to comment.