@@ -274,10 +274,10 @@ discard block |
||
| 274 | 274 | private function findFriendships($status = '%') |
| 275 | 275 | { |
| 276 | 276 | return Friendship::where('status', 'LIKE', $status) |
| 277 | - ->where(function ($query) { |
|
| 278 | - $query->where(function ($q) { |
|
| 277 | + ->where(function($query) { |
|
| 278 | + $query->where(function($q) { |
|
| 279 | 279 | $q->whereSender($this); |
| 280 | - })->orWhere(function ($q) { |
|
| 280 | + })->orWhere(function($q) { |
|
| 281 | 281 | $q->whereRecipient($this); |
| 282 | 282 | }); |
| 283 | 283 | }); |
@@ -313,10 +313,10 @@ discard block |
||
| 313 | 313 | |
| 314 | 314 | |
| 315 | 315 | $fofs = Friendship::where('status', Status::ACCEPTED) |
| 316 | - ->where(function ($query) use ($friendIds) { |
|
| 317 | - $query->where(function ($q) use ($friendIds) { |
|
| 316 | + ->where(function($query) use ($friendIds) { |
|
| 317 | + $query->where(function($q) use ($friendIds) { |
|
| 318 | 318 | $q->whereIn('sender_id', $friendIds); |
| 319 | - })->orWhere(function ($q) use ($friendIds) { |
|
| 319 | + })->orWhere(function($q) use ($friendIds) { |
|
| 320 | 320 | $q->whereIn('recipient_id', $friendIds); |
| 321 | 321 | }); |
| 322 | 322 | })->get(['sender_id', 'recipient_id']); |