-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get profile model data when getting all pending friend requests for profiles. #79
Comments
@YosefOberlander did you find a solution for this? |
@PonyUpDaddy I ended up making my own friendship implantation. |
@YosefOberlander Then add this:
and then you can do this.
or you can make you own model that extends the Interaction model so you can add the relation to the user model and you can eager load te re
or if not you can make your own relatinship to user model using the iteraction table with |
I did something like, I think it's the same issue:
|
@prawn185 |
In case anyone gets stuck implementing this solution like I did, you need to update the acquaintances.php config file friendship model under models->friendship for the extended model to work. My code to fetch the pending friend requests I ended up using was this:
Edit: changed code |
have a profile model with the users information and I’m importing Friendable. I’m able to send and receive friend requests successfully but when I call ‘auth()->user()->getCurrentUserProfile()->getFriendRequests()
, I only get the ‘friendships’ table data, not the profiles. I’d only get profiles data once the user accepts the friend request. I would like to get the profile data when calling ‘auth()->user()->getCurrentUserProfile()->getFriendRequests()
so I can display a users profile to a user who receives their friend request.The text was updated successfully, but these errors were encountered: