original_string: public function editTemplateAction(IncidentTemplate $template)
      {
          try {
              $template->update(Binput::get('template'));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.templates.edit', ['id' => $template->id])
                  ->withUpdatedTemplate($template)
                  ->withTemplateErrors($e->getMessageBag()->getErrors());
          }
  
          return cachet_redirect('dashboard.templates.edit', ['id' => $template->id])
              ->withUpdatedTemplate($template);
      }
code: public function editTemplateAction(IncidentTemplate $template)
      {
          try {
              $template->update(Binput::get('template'));
          } catch (ValidationException $e) {
              return cachet_redirect('dashboard.templates.edit', ['id' => $template->id])
                  ->withUpdatedTemplate($template)
                  ->withTemplateErrors($e->getMessageBag()->getErrors());
          }
  
          return cachet_redirect('dashboard.templates.edit', ['id' => $template->id])
              ->withUpdatedTemplate($template);
      }
code_tokens: public function editTemplateAction ( IncidentTemplate $ template ) { try { $ template -> update ( Binput :: get ( 'template' ) ) ; } catch ( ValidationException $ e ) { return cachet_redirect ( 'dashboard.templates.edit' , [ 'id' => $ template -> id ] ) -> withUpdatedTemplate ( $ template ) -> withTemplateErrors ( $ e -> getMessageBag ( ) -> getErrors ( ) ) ; } return cachet_redirect ( 'dashboard.templates.edit' , [ 'id' => $ template -> id ] ) -> withUpdatedTemplate ( $ template ) ; }
docstring: Edit an incident template.
  
  @param \CachetHQ\Cachet\Models\IncidentTemplate $template
  
  @return \Illuminate\Http\RedirectResponse
docstring_tokens: Edit an incident template .