public function page_by_permalink($permalink) { $post = Post::where("permalink", $permalink)->where("type", 2)->first(); if ($post) { return $post; } return false; }
public function home() { $posts = Post::where('type', 1)->orderBy("id", 'desc')->take(5)->get(); $slides = $this->slider->get_images(5); return $this->view->make("Striped::index", compact('posts', 'slides')); }
public function getList() { $ads = Post::where('type', PostType::ad)->orderBy('id', 'desc')->get(); return $this->theme->baseDashboard("Post::ad.AdList", compact('ads')); }
public function getList() { $posts = Post::where('type', PostType::post)->get(); return $this->theme->baseDashboard("Post::PostList", compact('posts')); }
public function getList() { $tabs = Post::where('type', PostType::tab)->orderBy('id', 'desc')->get(); return admin("PostModule::tab.TabList")->with(compact('tabs')); }
public function getList() { $pages = Post::where('type', PostType::page)->get(); return $this->theme->baseDashboard("Post::PageList")->with('pages', $pages); }