Beispiel #1
0
 public function page_by_permalink($permalink)
 {
     $post = Post::where("permalink", $permalink)->where("type", 2)->first();
     if ($post) {
         return $post;
     }
     return false;
 }
Beispiel #2
0
 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'));
 }
Beispiel #3
0
 public function getList()
 {
     $ads = Post::where('type', PostType::ad)->orderBy('id', 'desc')->get();
     return $this->theme->baseDashboard("Post::ad.AdList", compact('ads'));
 }
Beispiel #4
0
 public function getList()
 {
     $posts = Post::where('type', PostType::post)->get();
     return $this->theme->baseDashboard("Post::PostList", compact('posts'));
 }
Beispiel #5
0
 public function getList()
 {
     $tabs = Post::where('type', PostType::tab)->orderBy('id', 'desc')->get();
     return admin("PostModule::tab.TabList")->with(compact('tabs'));
 }
Beispiel #6
0
 public function getList()
 {
     $pages = Post::where('type', PostType::page)->get();
     return $this->theme->baseDashboard("Post::PageList")->with('pages', $pages);
 }