public function leaveAllTeams($userId)
    {
        $user = $this->model->find($userId);
        $user->teams()->detach();
    }
public function leaveAllTeams($userId)
    {
        $user = $this->model->find($userId);
        $user->teams()->detach();
    }
public function leaveAllTeams ( $ userId ) { $ user = $ this -> model -> find ( $ userId ) ; $ user -> teams ( ) -> detach ( ) ; }
Leave all teams

@param  integer $teamId
@param  integer $userId
@return void
Leave all teams