mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 15:23:12 +08:00
Centralized how routes are configured to support multi-segment slugs
This commit is contained in:
@@ -20,12 +20,12 @@ class InDateRange extends BaseSpecification
|
||||
{
|
||||
$criteria = [];
|
||||
|
||||
if ($this->dateRange?->startDate() !== null) {
|
||||
$criteria[] = Spec::gte($this->field, $this->dateRange->startDate()->toDateTimeString());
|
||||
if ($this->dateRange?->startDate !== null) {
|
||||
$criteria[] = Spec::gte($this->field, $this->dateRange->startDate->toDateTimeString());
|
||||
}
|
||||
|
||||
if ($this->dateRange?->endDate() !== null) {
|
||||
$criteria[] = Spec::lte($this->field, $this->dateRange->endDate()->toDateTimeString());
|
||||
if ($this->dateRange?->endDate !== null) {
|
||||
$criteria[] = Spec::lte($this->field, $this->dateRange->endDate->toDateTimeString());
|
||||
}
|
||||
|
||||
return Spec::andX(...$criteria);
|
||||
|
||||
Reference in New Issue
Block a user