public function removeTeamMember(Request $request, $teamId, $userId)
    {
        $user = $request->user();

        $team = $user->teams()
                ->where('owner_id', $user->id)->findOrFail($teamId);

        $team->removeUserById($userId);

        return $this->teams->getTeam($user, $teamId);
    }
public function removeTeamMember(Request $request, $teamId, $userId)
    {
        $user = $request->user();

        $team = $user->teams()
                ->where('owner_id', $user->id)->findOrFail($teamId);

        $team->removeUserById($userId);

        return $this->teams->getTeam($user, $teamId);
    }
public function removeTeamMember ( Request $ request , $ teamId , $ userId ) { $ user = $ request -> user ( ) ; $ team = $ user -> teams ( ) -> where ( 'owner_id' , $ user -> id ) -> findOrFail ( $ teamId ) ; $ team -> removeUserById ( $ userId ) ; return $ this -> teams -> getTeam ( $ user , $ teamId ) ; }
Remove a team member from the team.

@param  \Illuminate\Http\Request  $request
@param  string  $teamId
@param  string  $userId
@return \Illuminate\Http\Response
Remove a team member from the team .