You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @musonza I hope you are doing well.
Is it normal that when I use the groups->addMembers method
I get all the old members deleted from the group ?
I want to add new members to the actual members
This is the code I used
public function ajouterEleve(Request $request){
$eleves =$request->input('eleves');
$id=$request->input('groupId');
$group= Groups::group($id);
$group->addMembers($eleves);
return redirect()->back();
}
can you explain this please
public function addMembers($members)
{
if (is_array($members)) {
$this->users()->sync($members);
} else {
$this->users()->attach($members);
}
return $this;
}
The text was updated successfully, but these errors were encountered:
Hello @musonza I hope you are doing well.
Is it normal that when I use the groups->addMembers method
I get all the old members deleted from the group ?
I want to add new members to the actual members
This is the code I used
can you explain this please
The text was updated successfully, but these errors were encountered: