Skip to content

Toggling Associations  #1299

Open
Open
@reo4

Description

@reo4

when i use toggle function in many to many relationship it attaches id as property has a value empty array
and it doesn't behave as expected

 public function toggleMember(Board $board , Request $request)
    {   
        $board->members()->toggle([$request->member_id]);
        
        return response()->Json(Board::find($board->_id));
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs investigationNeed investigation about bugs described in issuebugrelationsRelations between documents

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions