Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter friends #83

Open
kife-design opened this issue Mar 15, 2022 · 5 comments
Open

Filter friends #83

kife-design opened this issue Mar 15, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@kife-design
Copy link

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.

@ange007
Copy link
Contributor

ange007 commented Jun 5, 2022

Also interested.
I don't see an option without editing the source code.

@mkwsra
Copy link
Member

mkwsra commented Jun 5, 2022

Let me check it out

@mkwsra
Copy link
Member

mkwsra commented Jun 5, 2022

Honestly, I'm not gonna work on it now, however, I would really appreciate any help (Send me a PR if you can @ange007)

@mkwsra mkwsra added the enhancement New feature or request label Jun 5, 2022
@mkwsra
Copy link
Member

mkwsra commented Jun 5, 2022

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

@ange007
Copy link
Contributor

ange007 commented Jun 5, 2022

Example:

$friends = $user->getFriendsQueryBuilder()
                ->where(function($query) use ($query) {
                    $query->where('name', 'LIKE', "{$query}%")
                        ->orWhere('login', 'LIKE', "{$query}%");
                })
                ->paginate($limit);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants