Preload()
Hello!
I have this structure:
* Users
* Business
-> Users (related with table USERS)
-> Branches (where i related users where has relation with the business)
When i search in the select, run ok. but the preload get all users, i want get the users where has relation with the business)
Whats the error? thanks
3 Replies
Use a closure as the third parameter on the relationship() method to constrain the relation query, similar to how you do it in the search.
ITS RUNNING, THANK'S
Remember to mark the solution, so it gets indexed by Google and helps the next person searching.