Skip to content

Commit

Permalink
Fix recent items filter + hopefully fix closet/wishlist caching
Browse files Browse the repository at this point in the history
  • Loading branch information
momijizukamori committed Sep 11, 2024
1 parent 872919d commit 69d2f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function homepage()
$brands = Brand::cached();
$categories = Category::cached();
$recent = Item::with(Item::PARTIAL_LOAD)
->whereNotNull('published_at')
->where('status', Item::PUBLISHED)
->orderBy('published_at', 'desc')
->whereNotNull('image')
->whereDoesntHave('tags', function (Builder $query) {
Expand Down
4 changes: 2 additions & 2 deletions resources/views/items/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ class="text-regular">{{ $item->published_at->format('jS M Y, H:i') }} UTC
<div class="row">
<div class="col p-1 list-group text-center small">
<div class="list-group-item">
<i class="fal fa-star"></i> {{ $item->wishlist() }} {{ trans_choice('ui.wishlist.stargazers', $item->stargazers()->count()) }}
<i class="fal fa-star"></i> {{ $item->wishlist() }} {{ trans_choice('ui.wishlist.stargazers', $item->wishlist()) }}
</div>
</div>
<div class="col p-1 list-group text-center small">
<div class="list-group-item">
<i class="fal fa-shopping-bag"></i> {{ $item->closet() }} {{ trans_choice('ui.closet.owners', $item->owners()->count()) }}
<i class="fal fa-shopping-bag"></i> {{ $item->closet() }} {{ trans_choice('ui.closet.owners', $item->closet()) }}
</div>
</div>
</div>
Expand Down

0 comments on commit 69d2f46

Please sign in to comment.