Devise\Templates\TemplatesResponseHandler::executeDestroy PHP Метод

executeDestroy() публичный Метод

Executes destroy template method in TemplatesManager and properly handles the response.
public executeDestroy ( string $templatePath ) : Redirect
$templatePath string
Результат Redirect
    public function executeDestroy($templatePath)
    {
        if ($this->TemplatesManager->destroyTemplate($templatePath)) {
            return $this->Redirect->route('dvs-templates')->with('message', 'Template deleted succesfully');
        }
        return $this->Redirect->route('dvs-templates')->withErrors($this->TemplatesManager->errors)->with('message', 'There were validation errors');
    }