Flarum\Core\Guest::getGroupsAttribute PHP Method

getGroupsAttribute() public method

Get the guest's group, containing only the 'guests' group model.
public getGroupsAttribute ( ) : Group
return Group
    public function getGroupsAttribute()
    {
        if (!isset($this->attributes['groups'])) {
            $this->attributes['groups'] = $this->relations['groups'] = Group::where('id', Group::GUEST_ID)->get();
        }
        return $this->attributes['groups'];
    }