Skip to content

Commit

Permalink
Changed show latest packages from year
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Mar 29, 2024
1 parent 9abfae1 commit 6d25cb2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Http/Controllers/PackagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public function delete(Request $request, Package $package)
public function latest()
{
$packages = Package::approved()
->whereDate('created_at', '>=', now()->subMonth())
->whereDate('created_at', '>=', now()->subYear())
->inRandomOrder()
->limit(3)->get();
->limit(3)
->get();

return view('packages.latest', [
'packages' => $packages,
Expand Down

0 comments on commit 6d25cb2

Please sign in to comment.