Closed csb346 closed 5 years ago
I'm going to guess it's related to https://github.com/cviebrock/eloquent-taggable/issues/60#issuecomment-330493812 ... which really doesn't have a fix, since I can't know what all the columns are in your articles
table.
Unless you can turn off strict mode, I don't have an easy solution.
I got this error too
Well you don't need to know what is in the articles table. The function is just returning a list of article ids which you are using explicitly in the group by. group by articles.id. No need to use * in this case.
I'm definitely open to a PR that can fix this.
Closing due to no response. Feel free to re-open or comment if you are still having issues.
This is my solution
$tags = ['tag1', 'tag2', 'tag3'];
$taggable = Taggable::query();
foreach ($tags as $tag) {
$taggable->whereHas('tags', function (Builder $q) use ($tag) {
$q->where('normalized', $tag);
});
}
got it from here https://github.com/spatie/laravel-tags/blob/master/src/HasTags.php#L79
hey thanks for the efforts was put to build up this package, unfortuantely I am also encountering this issue.thanks
Hi! I need some help.
I already used this package on other projects without any problem. This time I don't understand why, but scopes are returning an sql syntax error. A simple example test:
Any idea why? I can't find any error. Anyway this query is from the package and never had any problem before.
Thanks.