Skip to content
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 work getFriends() function #76

Open
physio opened this issue Feb 9, 2017 · 2 comments
Open

How to work getFriends() function #76

physio opened this issue Feb 9, 2017 · 2 comments

Comments

@physio
Copy link
Contributor

physio commented Feb 9, 2017

Why the $model->getFriends() function return only the friend that has the same model of $model?

@hootlex
Copy link
Owner

hootlex commented Apr 9, 2017

Could you provide a failing test for this issue?

@fortael
Copy link

fortael commented Jul 15, 2017

@hootlex

Same problem

id sender_id sender_type recipient_id recipient_type status created_at updated_at
18 1 App\User 4 App\Worker 1 ... ...
19 1 App\User 14 App\Worker 1 ... ...
$friends = \Auth::user()->getFriends();
dd($friends);

Returns

Collection {#386 ▼
  #items: []
}

Also would be great to have a function to find friends only with specific model. Like groups but for model. I know it's hard to select who exactly friend in current relation. But maybe at least in one direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants