public function postRestore(Page $page, Request $request) { $this->authorize('publish', $page); $version = PageVersion::find($page, $request->input('versionId')); if ($version) { PageVersion::restore($version); } }
/** * Show the page version history. * * @param Page $page * * @return View */ public function getHistory(Page $page) { $this->authorize('edit', $page); return view("{$this->viewPrefix}.history", ['versions' => PageVersionFacade::history($page), 'page' => $page, 'diff' => new Diff()]); }