From 62183051891440f81ee904c999ab5c8687608194 Mon Sep 17 00:00:00 2001 From: Riajul Islam Date: Wed, 29 Jan 2025 17:26:41 +0600 Subject: [PATCH 1/2] feat: add Support for BunnyCDN, bunny doesn't support lastModified on directory, so return null when bunny detected. --- src/LfmItem.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/LfmItem.php b/src/LfmItem.php index e7f48747..8806e524 100644 --- a/src/LfmItem.php +++ b/src/LfmItem.php @@ -110,6 +110,13 @@ public function size() public function time() { + if (function_exists('config')) { + $disk = config('disk'); + $driver = $disk ? config("filesystems.disks.$disk.driver") : null; + if (($driver == 'bunny' || $driver == 'bunnycdn') && $this->isDirectory()) { + return null; + } + } return $this->lfm->lastModified(); } From 8e1f74c50e74e587e168033ee363d4fa4a873ccf Mon Sep 17 00:00:00 2001 From: Riajul Islam Date: Wed, 29 Jan 2025 17:27:03 +0600 Subject: [PATCH 2/2] feat: add Support for BunnyCDN, bunny doesn't support lastModified on directory, so return null when bunny detected. --- src/LfmItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LfmItem.php b/src/LfmItem.php index 8806e524..92545994 100644 --- a/src/LfmItem.php +++ b/src/LfmItem.php @@ -111,7 +111,7 @@ public function size() public function time() { if (function_exists('config')) { - $disk = config('disk'); + $disk = $this->helper->config('disk'); $driver = $disk ? config("filesystems.disks.$disk.driver") : null; if (($driver == 'bunny' || $driver == 'bunnycdn') && $this->isDirectory()) { return null;