laravel-acquaintances
laravel-acquaintances copied to clipboard
Filter friends
Hello!
First of all, great package.
Is there a way to filter friends? At the moment you have the getFriends() method, but there is no way to say "give me all my friends that are from Belgium" for example.
Also interested. I don't see an option without editing the source code.
Let me check it out
Honestly, I'm not gonna work on it now, however, I would really appreciate any help (Send me a PR if you can @ange007)
Guys please try this locally, after the PR @ange007 , thankfully, made and let me know so I can create a new version of the library, and then close this issue #86
Example:
$friends = $user->getFriendsQueryBuilder()
->where(function($query) use ($query) {
$query->where('name', 'LIKE', "{$query}%")
->orWhere('login', 'LIKE', "{$query}%");
})
->paginate($limit);