Handle lastSeen column and all the discontinued items.

This commit was merged in pull request #35.
This commit is contained in:
2026-01-10 08:56:31 +01:00
parent 914310dab8
commit 7920172735
6 changed files with 28 additions and 11 deletions

View File

@@ -17,10 +17,9 @@ final class DiscontinuedController extends BaseController
return $this->render('productList.html.twig', ['listType' => 'discontinued']);
}
$products = Product::where('updated_at', '<', now()->format('Y-m-d'))
$products = Product::where('lastSeen', '<', now()->format('Y-m-d'))
->orderByDesc('starred')
->orderByDesc('created_by')
->with(['currentPrice', 'lowestPrice'])
->get();
return $this->render('productList.html.twig', ['products' => $products, 'listType' => 'discontinued']);
}