Пример #1
0
 public function show($id)
 {
     $m = array(24, 28, 30, 47, 29, 73, 37, 46, 59, 60);
     $k = array(9, 12, 55, 56, 40, 41, 93, 141, 85, 192);
     $user = User::findOrFail($id);
     $comments = Comment::latest('created_at')->paginate(20);
     $commits = Commit::latest('created_at')->get();
     return view('profile.show', compact('user', 'comments', 'commits', 'checkFriend', 'm', 'k'));
 }
 public function show($id)
 {
     if (!Auth::check()) {
         return redirect('/');
     }
     $clanak = Article::findOrFail($id);
     $komentari = Comment::latest('created_at')->where('article_id', '=', $id)->get();
     return view('auth.komentari', compact('clanak', 'komentari'));
 }
Пример #3
0
 /**
  * Display the specified resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function show()
 {
     $comments = Comment::latest()->get();
     return view('comment', compact('comments'));
 }
Пример #4
0
 public function comments()
 {
     $all_comments = Comment::latest()->paginate(20);
     $current_form = 'comments';
     return view('admin.comments', compact('all_comments', 'current_form'));
 }
 public function show($id)
 {
     $clanak = Article::findOrFail($id);
     $komentari = Comment::latest('created_at')->where('article_id', '=', $id)->get();
     return view('clanak.clanak', compact('clanak', 'komentari'));
 }
Пример #6
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($category_slug, $slug)
 {
     $category = Category::where('slug', '=', $category_slug)->first();
     $comments = Comment::latest()->paginate(15);
     $post = Post::where('slug', '=', $slug)->first();
     //$post_tags = PostTags::where('post_id', '=', $post->id)->get();
     //User::find(1)->role->name;
     $tags = Post::find($post->id)->tags;
     return view('pages.posts.show', compact('post', $post, 'category', $category, 'comments', $comments, 'tags', $tags));
 }
Пример #7
0
 public function manageComment()
 {
     $comments = Comment::latest('created_at')->get();
     return view('admin.comment', compact('comments'));
 }