app/Http/Controllers/Settings/TeamController.php
public function update(Request $request, $teamId)
    {
        $user = $request->user();

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

        $this->validateTeamUpdate($request, $team);

        if (Spark::$updateTeamsWith) {
            $this->callCustomUpdater(Spark::$updateTeamsWith, $request, [$team]);
        } else {
            $team->fill(['name' => $request->name])->save();
        }

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

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

        $this->validateTeamUpdate($request, $team);

        if (Spark::$updateTeamsWith) {
            $this->callCustomUpdater(Spark::$updateTeamsWith, $request, [$team]);
        } else {
            $team->fill(['name' => $request->name])->save();
        }

        return $this->teams->getTeam($user, $teamId);
    }
Update the team's owner information.

@param  \Illuminate\Http\Request  $request
@param  int  $teamId
@return \Illuminate\Http\Response