original_string: public function update(TeamRequest $request, Team $team)
      {
          try {
              $attributes = $request->all();
  
              $team->update($attributes);
              return $this->response->message(trans('messages.success.updated', ['Module' => trans('team::team.name')]))
                  ->code(204)
                  ->status('success')
                  ->url(guard_url('team/team/' . $team->getRouteKey()))
                  ->redirect();
          } catch (Exception $e) {
              return $this->response->message($e->getMessage())
                  ->code(400)
                  ->status('error')
                  ->url(guard_url('team/team/' . $team->getRouteKey()))
                  ->redirect();
          }
  
      }
code: public function update(TeamRequest $request, Team $team)
      {
          try {
              $attributes = $request->all();
  
              $team->update($attributes);
              return $this->response->message(trans('messages.success.updated', ['Module' => trans('team::team.name')]))
                  ->code(204)
                  ->status('success')
                  ->url(guard_url('team/team/' . $team->getRouteKey()))
                  ->redirect();
          } catch (Exception $e) {
              return $this->response->message($e->getMessage())
                  ->code(400)
                  ->status('error')
                  ->url(guard_url('team/team/' . $team->getRouteKey()))
                  ->redirect();
          }
  
      }
code_tokens: public function update ( TeamRequest $ request , Team $ team ) { try { $ attributes = $ request -> all ( ) ; $ team -> update ( $ attributes ) ; return $ this -> response -> message ( trans ( 'messages.success.updated' , [ 'Module' => trans ( 'team::team.name' ) ] ) ) -> code ( 204 ) -> status ( 'success' ) -> url ( guard_url ( 'team/team/' . $ team -> getRouteKey ( ) ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'team/team/' . $ team -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
docstring: Update the team.
  
  @param Request $request
  @param Model   $team
  
  @return Response
docstring_tokens: Update the team .