Skip to content

Commit

Permalink
Merge branch 'release/4.1.30'
Browse files Browse the repository at this point in the history
* release/4.1.30:
  updated the changelog
  fixed the query scope on published posts
  • Loading branch information
austintoddj committed Apr 26, 2019
2 parents 9b3af37 + e6af906 commit eeb317c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes

## [v4.1.30](https://github.com/cnvs/canvas/compare/v4.1.29...v4.1.30)

### Fixed
- Fixed the query scope for published posts ([be072bd](https://github.com/cnvs/canvas/commit/be072bd583e738ed7422cb31a171b73e4f8d5e2f))

## [v4.1.29](https://github.com/cnvs/canvas/compare/v4.1.28...v4.1.29)

### Added
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/StatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class StatsController extends Controller
public function index()
{
// Get all of the posts
$posts = Post::orderByDesc('created_at')
$posts = Post::published()
->orderByDesc('created_at')
->select('id', 'title', 'body', 'published_at', 'created_at')
->withCount('views')
->get();
Expand Down

0 comments on commit eeb317c

Please sign in to comment.