| @@ 90-99 (lines=10) @@ | ||
| 87 | ->get(); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function friendRequestsReceived() |
|
| 91 | { |
|
| 92 | $senders = Friendship::whereRecipient($this) |
|
| 93 | ->accepted(0) |
|
| 94 | ->get(['requester']) |
|
| 95 | ->toArray(); |
|
| 96 | ||
| 97 | return static::whereIn('id', $senders) |
|
| 98 | ->get(); |
|
| 99 | } |
|
| 100 | ||
| 101 | public function friendRequestsSent() |
|
| 102 | { |
|
| @@ 101-110 (lines=10) @@ | ||
| 98 | ->get(); |
|
| 99 | } |
|
| 100 | ||
| 101 | public function friendRequestsSent() |
|
| 102 | { |
|
| 103 | $recipients = Friendship::whereSender($this) |
|
| 104 | ->accepted(0) |
|
| 105 | ->get(['user_requested']) |
|
| 106 | ->toArray(); |
|
| 107 | ||
| 108 | return static::whereIn('id', $recipients) |
|
| 109 | ->get(); |
|
| 110 | } |
|
| 111 | ||
| 112 | public function isFriendsWith($user) |
|
| 113 | { |
|