group join
harpreetsinghdhiman500 opened this issue · 0 comments
harpreetsinghdhiman500 commented
controller:
public function add_member($group_id,$friend_id){
$user = Auth::user();
$group_name=user_group::find($group_id);
$friend=User::find($friend_id);
$user->groupFriend($friend, $group_name);
}
config/friendships.php
'groups' => [
0 => [
'slug'=> 'acquaintances',
'name'=> 'Acquaintances'
],
1 => [
'slug'=> 'close_friends',
'name'=> 'Close Friends'
],
2 => [
'slug'=> 'family',
'name'=> 'My Super Family'
]
]
its give an error Illegal offset type
what will i do?