예제 #1
0
 /**
  * @param $slug
  * @return \Illuminate\View\View
  */
 public function uri($slug)
 {
     $page = $this->page->findBySlug($slug);
     $this->throw404IfNotFound($page);
     $template = $this->getTemplateForPage($page);
     return view($template, compact('page'));
 }
예제 #2
0
 public function destroy($slug)
 {
     $page = $this->page->findBySlug($slug);
     $page->delete();
     flash(trans('core::messages.resource.resource deleted', ['name' => trans('page::page.title.page')]));
     return redirect()->route('backend::page.pages.index');
 }