This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jered.masters3609
jered.masters3609

I can create a user, and create a group, just need to connect the two :)

i'm looking for something like:

$user->groups->add($group);

The above code works, but it doesn't save to the database

Last updated

jered.masters3609
jered.masters3609

Nevermind. I worked it out:

$group->users()->save($user);

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.