laravel-friendships
laravel-friendships copied to clipboard
How do you check relationship with other user before sending a friend request?
trafficstars
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?
$user->isFriendWith($friend); $user->hasFriendRequestFrom($sender); $user->hasSentFriendRequestTo($recipient); $user->hasBlocked($friend);
What about this? It's on their docs