public function show($slug) { $page = Page::where('slug', $slug)->where('status', 'Active')->first(); if ($page != null) { return view('site.pages.static_page', ['page' => $page, 'seo_title' => $page->seo_title, 'seo_meta_description' => $page->seo_meta_description, 'seo_meta_keywords' => $page->seo_meta_keywords]); } else { App::abort('404'); } }
public function destroy($id) { Page::destroy($id); flash()->success('The Page has been successfully deleted!'); }