Skip to content

Commit

Permalink
Merge branch 'main' of github.com:coderflexx/laravisit into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ousid committed Feb 13, 2022
2 parents 291c968 + 9d875ea commit d37c8b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/Concerns/FilterByPopularityTimeFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function scopePopularLastDays(Builder $builder, int $days): Builder
public function scopePopularThisWeek(Builder $builder): Builder
{
return $builder->popularBetween(
now()->startOfWeek(),
now()->endOfWeek(),
);
now()->startOfWeek(),
now()->endOfWeek(),
);
}

/**
Expand All @@ -72,9 +72,9 @@ public function scopePopularThisWeek(Builder $builder): Builder
public function scopePopularLastWeek(Builder $builder): Builder
{
return $builder->popularBetween(
$startOfLastWeek = now()->subDay(7)->startOfWeek(),
$startOfLastWeek->copy()->endOfWeek()
);
$startOfLastWeek = now()->subDay(7)->startOfWeek(),
$startOfLastWeek->copy()->endOfWeek()
);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/Feature/Visits/PopularityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,3 @@

expect($posts->count())->toBe(1);
});


0 comments on commit d37c8b0

Please sign in to comment.