Skip to content

Commit 64180f3

Browse files
tag stuff and fix deleted posts from showing on post index
1 parent f6c0a82 commit 64180f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/LetsBlog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class LetsBlog
1212
{
1313
public static function published()
1414
{
15-
return Post::with('tags', 'series')->orderBy('published_at', 'desc')->paginate(config('letsblog.posts.perpage'));
15+
return Post::with('tags', 'series')->where('status', 'active')->orderBy('published_at', 'desc')->paginate(config('letsblog.posts.perpage'));
1616
}
1717

1818
public static function search($q = '')

resources/views/themes/extension/layout.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
@section ('layout.sidebar')
4949

50-
@include (lb_view('components.tags'), ['title' => 'Popular Tags', 'tags' => LetsBlog::popularTags(10)])
50+
@include (lb_view('components.tags'), ['title' => 'Popular Tags', 'tags' => \LetsBlog::popularTags(10)])
5151

5252
@show
5353

0 commit comments

Comments
 (0)