Filter/Show data by appended attribute or from relationship #1065
Unanswered
BenOussama180
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I might be getting a bit confused here, so please excuse any ignorance! But could you not use the where clause within your with() statement to load in the appropriate "on order" bool? Just a high level example that'd get orders that the user_id matches the Auth::id()
Or you can use scopes e.g. Local Scopes to restrict your loads (where applicable) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
so i have this in my link model :
and this in my LinkTable Component
the thing is, i can not access the 'is_on_order' attribute to show if the current link has been ordered by a user or not , how can i accesss it ? is there any othher workaround for it by using the orders relationship in my model ? please help
@rappasoft any idea ? thanks in andvanced !
Beta Was this translation helpful? Give feedback.
All reactions