Skip to content

Commit 08e726d

Browse files
committed
Fixed issues with timestamps
1 parent f85e2b8 commit 08e726d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Image/ImageRepresentation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ private function getValue(string $name, $value)
9999
return pathinfo($this->filePath, PATHINFO_EXTENSION);
100100
case 'isConfidential':
101101
return (bool)$this->expires;
102+
case 'expiresCarbon':
103+
return $this->isConfidential ? Carbon::createFromTimestamp($this->expires) : null;
102104
case 'isExpired':
103105
return $this->isConfidential ? $this->expiresCarbon->isPast() : false;
104106
}

src/routes/resources.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
->where(
1313
[
1414
'folder' => '[a-zA-Z0-9\_\-]+',
15-
'path' => '[a-zA-Z0-9\_\-]+',
15+
'path' => '[a-zA-Z0-9\_\-]+::[a-zA-Z0-9\_\-]+',
1616
'extension' => '(jpg|jpeg|png)',
1717
]
1818
)

0 commit comments

Comments
 (0)