public function leaveTeam($teamId, $userId)
    {
        $team = $this->team->find($teamId);
        $user = $this->model->find($userId);

        $user->teams()->detach($team);
    }
public function leaveTeam($teamId, $userId)
    {
        $team = $this->team->find($teamId);
        $user = $this->model->find($userId);

        $user->teams()->detach($team);
    }
public function leaveTeam ( $ teamId , $ userId ) { $ team = $ this -> team -> find ( $ teamId ) ; $ user = $ this -> model -> find ( $ userId ) ; $ user -> teams ( ) -> detach ( $ team ) ; }
Leave a team

@param  integer $teamId
@param  integer $userId
@return void
Leave a team