pageTitle = trans('renatio.dynamicpdf::lang.templates.preview_pdf'); try { $model = $this->formFindModelObject($id); } catch (ApplicationException $e) { return $this->handleError($e); } return PDF::loadLayout($model->code) ->setLogOutputFile(storage_path('temp/log.htm')) ->setIsRemoteEnabled(true) ->stream(); } public function html($id) { $model = $this->formFindModelObject($id); return response($model->html); } public function update_onResetDefault($recordId) { $model = $this->formFindModelObject($recordId); $model->fillFromCode(); $model->save(); Flash::success(e(trans('backend::lang.form.reset_success'))); return redirect()->refresh(); } }