예제 #1
0
 public function postRestore(Page $page, Request $request)
 {
     $this->authorize('publish', $page);
     $version = PageVersion::find($page, $request->input('versionId'));
     if ($version) {
         PageVersion::restore($version);
     }
 }
예제 #2
0
 /**
  * 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()]);
 }