Advertisement
Guest User

Untitled

a guest
Jan 8th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1.  public function delete($friend_id)
  2.     {
  3.         $friends = Friend::where([
  4.             'user_id' => $friend_id,
  5.             'friend_id' => Auth::id(),
  6.             'accepted' => 1,
  7.         ])->get();
  8.  
  9.         $friends2 = Friend::where([
  10.             'user_id' => Auth::id(),
  11.             'friend_id' => $friend_id,
  12.             'accepted' => 1,
  13.         ])->get();
  14.  
  15.         $friendsNotWorking = Friend::where([
  16.             'user_id' => $friend_id,
  17.             'friend_id' => Auth::id(),
  18.             'accepted' => 1,
  19.         ])->orWhere([
  20.             'user_id' => Auth::id(),
  21.             'friend_id' => $friend_id,
  22.             'accepted' => 1,
  23.         ])->get();
  24.  
  25.         dd($friends, $friends2, $friendsNotWorking);
  26.  
  27.         return back();
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement