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 do you check relationship with other user before sending a friend request? #134

Open
patterueldev opened this issue Jan 8, 2020 · 1 comment

Comments

@patterueldev
Copy link

I can't find a method that will check if there's "an existing record" on the friend request table (I'd have to use Eloquent manually), but there could be a method created to check this right? I mean,

What if the other user is already:
Added? Pending Request? Blocked?

Is there a single method to check this?

@ronssij
Copy link

ronssij commented Mar 2, 2020

$user->isFriendWith($friend);
$user->hasFriendRequestFrom($sender);
$user->hasSentFriendRequestTo($recipient);
$user->hasBlocked($friend);

What about this? It's on their docs

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

2 participants