Exemplo n.º 1
0
 public function anyDetail($id)
 {
     $blogs = Blogs::find($id);
     $relate_blogs = Blogs::limit(3)->get();
     $comments = $blogs->comments;
     return view("news.detail")->withBlogs($blogs)->withComments($comments)->withRelateBlog($relate_blogs);
 }
Exemplo n.º 2
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $menu_right_popular = Blogs::get();
     $menu_right_newest = Blogs::orderBy("id", "desc")->get();
     $menu_right_comment = Comment::all();
     $blog_bottom_footer = Blogs::limit(3)->get();
     view()->share(['menu_right_popular' => $menu_right_popular, 'menu_right_newest' => $menu_right_newest, 'menu_right_comment' => $menu_right_comment, "current_lang" => Session::get("current_lang"), "blog_bottom_footer" => $blog_bottom_footer]);
 }