This commit is contained in:
James Cole committed 2020-09-06 07:27:36 +02:00
1 parent af58c30249
commit 9d35048fb9
1 file changed
+3 -2
+3 -2
View File
@@ -180,8 +180,9 @@ class TagController extends Controller
public function index(TagRepositoryInterface $repository)
{
// start with oldest tag
$oldestTagDate = null === $repository->oldestTag() ? clone session('first') : $repository->oldestTag()->date;
$newestTagDate = null === $repository->newestTag() ? new Carbon : $repository->newestTag()->date;
$first = session('first', today()) ?? today();
$oldestTagDate = null === $repository->oldestTag() ? clone $first : $repository->oldestTag()->date;
$newestTagDate = null === $repository->newestTag() ? today() : $repository->newestTag()->date;
$oldestTagDate->startOfYear();
$newestTagDate->endOfYear();
$tags = [];