/** * @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')); }
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'); }