Created
June 30, 2016 18:35
-
-
Save bericp1/d0d6ab900ebae005b887e064baecefb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FriendshipRepository implements Contract { | |
public function countAccepted($user) { | |
$user = $user instanceof User ? $user->id : $user; | |
return $this->model->where('user_id', $user) | |
->where('status', 'accepted') | |
->count(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment