hootlex / laravel-friendships

This package gives Eloquent models the ability to manage their friendships.
MIT License
704 stars 150 forks source link

$user->groupFriend($friend, $group_name); #85

Open harpreetsinghdhiman500 opened 7 years ago

harpreetsinghdhiman500 commented 7 years ago

@hootlex I want to add friend in group.I do not any idea in $user->groupFriend($friend, $group_name); what $group_name is realy want. it give an error as
ErrorException in Friendable.php line 124: Illegal offset type in isset or empty

stephane-monnot commented 7 years ago

Have you defined your groups in your config file ? https://github.com/hootlex/laravel-friendships#friend-groups

harpreetsinghdhiman500 commented 7 years ago

I use $user->groupFriend($friend, $group_name); for join a friend in a group.

but it give an error

Illegal offset type in isset or empty

I have an error in this code

    if (!isset($groupsAvailable[$groupSlug]) || empty($friendship)) {
               return false;
    }

$groupsAvailable[$groupSlug] what it get

On Wed, Apr 12, 2017 at 2:52 PM, Stéphane Monnot notifications@github.com wrote:

Have you defined your groups in your config file ? https://github.com/hootlex/laravel-friendships#friend-groups

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hootlex/laravel-friendships/issues/85#issuecomment-293522073, or mute the thread https://github.com/notifications/unsubscribe-auth/AY2RjuHlyGcNJM31ZJ8RyrNP8T-4FXeKks5rvJfHgaJpZM4M7A0Z .