FIX: fix published_from and published_to

This commit is contained in:
Michal Kváček
2016-10-10 21:45:31 +02:00
parent b3ac9b9eec
commit 0384fab421
2 changed files with 4 additions and 4 deletions
@@ -100,11 +100,11 @@ class ArticleList extends Handler
->with('comments')
->with('category')
->where(function ($query) {
$query->where('published_from', '>', Carbon::now())
$query->where('published_from', '<', Carbon::now())
->orWhereNull('published_from');
})
->where(function ($query) {
$query->where('published_to', '<', Carbon::now())
$query->where('published_to', '>', Carbon::now())
->orWhereNull('published_to');
})
->orderBy('published_from', 'DESC')