-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add user's personal groups (acquaintances, family, etс.) support #33
Conversation
Wow, great feature! Just a few notes:
Thanks! |
@hootlex I think maybe later config array with groups can grow up to a separate table and its migration class can be named like |
@nikolaynesov Sorry for my late response. The class which will contain the Group names can be called |
Hi @hootlex,
|
|
ok, but what if user wants to add one (same) friend to different (2+) groups? What if you do not have any groups at all so why do we need to keep empty columns? I started with the idea of additional columns but moved to current solution as it is more flexible. |
Okay then, let's do it with a second table! 👍 |
so should we just publish the migration for the second table by default? |
Yup! |
Describe the package configuration
Uncomment config 'groups' array, publish migration.
Good job! Though, I've found a bug with removing a group from a friendship. |
@hootlex Should we refactor the documentation ? |
Test trait methods getAllFriendships(), getAcceptedFriendships(), getFriendsCount(), getFriends() with groups
I have updated the README slightly. Do you want to add more details? |
@nikolaynesov , |
@hootlex added tests |
@stephane-monnot Yeah, definitely. I was also thinking that readme has to be improved/updated. @nikolaynesov Good job, thanks! |
@stephane-monnot maybe it's time to remove the word Eloquent and mention only friendships between users. |
@hootlex Good idea ! |
@hootlex What do you think about adding a tag 1.1.0 ? |
@stephane-monnot I think it's a good idea. After merging #39 it will be solid to have v1.1 and go to v2.0 with #16. |
Maybe we can add deprecated note in 1.1 if we want to change friends() method in 2.0. Because I want to use Actually, getMutualFriends in my PR return a collection, but I think that it's better to always return querybuilder, because people may want to filter, order and after |
I agree with the deprecation note.
|
@stephane-monnot In the v2 we should refer only this way in the docs |
I will try to finish my PR with incoming() and outgoing soon. So we should :
|
Great! Feel free to add deprecation notices to the methods you are removing. Since we are renaming the most deprecated methods, instead of 'You should implement this method yourself...' you can inform the user which will be the new method name for this feature, where possible. |
Thank you ! The But you are right, because we can use |
@nikolaynesov what's the purpose of |
@hootlex yes, we use only this file. |
@nikolaynesov so, the rest of them can be safely deleted, right? |
@hootlex sure. Those that are not used in Travis file can be removed. |
User can group/ungroup his/her friends with new methods groupFriend & ungroupFriend.
Personal groups support added to getAllFriendships, getAcceptedFriendships, getFriendsCount, getFriends methods.