Skip to content

Get Activity with Where Custom Properties Doesn't Work #728

Answered by Gummibeer
tandang213 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
they issue is the order of your method calls. In your code-snippet you run the where() on the Eloquent Collection and not on the Eloquent Query-Builder.

Activity::where('properties->type', 'auth')->get();

This will add a JSON field WHERE condition to the DB query and return a filtered Collection.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Gummibeer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #728 on May 28, 2020 10:17.