Add new badge. Update screenshot.
This commit is contained in:
@@ -35,7 +35,8 @@ class AppExtension extends AbstractExtension
|
||||
|
||||
public function newCount(): int
|
||||
{
|
||||
return Product::whereHas('created_at', now()->subDays(30)->format('Y-m-d'))->count();
|
||||
$date = (new \DateTime())->modify('-30 days')->format('Y-m-d');
|
||||
return Product::where('created_at', '>', $date)->count();
|
||||
}
|
||||
|
||||
public function findByCreatedAtDate(Collection $items, string $date): Stock|Price|null
|
||||
|
||||
Reference in New Issue
Block a user