How to load only my own records (user_id filter) #1245
-
Currently I have used the basic https://rappasoft.com/docs/laravel-livewire-tables/v2/usage/the-query |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You have three realistic options First one (low impact - would recommend) Second one (potential impact) Third one (re-engineer - more painful) |
Beta Was this translation helpful? Give feedback.
-
@lrljoe thanks for your reply! I'm trying the first, which seems easy to do but triggers the following error, might be just me not doing things the right way but can't seem to find what's wrong. Just tried to add the builder function like shown in the docs. ![]() For the second or third option, are you referring to this technique? https://www.tutsmake.com/laravel-global-scope-example/ |
Beta Was this translation helpful? Give feedback.
-
Figured it out by checking the source of the original class
|
Beta Was this translation helpful? Give feedback.
Make sure to include builder in the top of your component.
Don't typehint it or try to add any variables into the class instantiation
It should resemble