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);
    }
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);
    }
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 ) ; }
Edit an incident template.

@param \CachetHQ\Cachet\Models\IncidentTemplate $template

@return \Illuminate\Http\RedirectResponse
Edit an incident template .