From 44c0c656becb4f80d0f704a893953d8cee47c669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harold=20S=C3=A1nchez?= Date: Fri, 13 Jul 2018 14:16:52 -0500 Subject: [PATCH] Update CdnFacade.php --- src/Vinelab/Cdn/CdnFacade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Vinelab/Cdn/CdnFacade.php b/src/Vinelab/Cdn/CdnFacade.php index 37b7b24..0c970fe 100755 --- a/src/Vinelab/Cdn/CdnFacade.php +++ b/src/Vinelab/Cdn/CdnFacade.php @@ -77,8 +77,9 @@ public function __construct( */ public function asset($path) { - // if asset always append the public/ dir to the path (since the user should not add public/ to asset) - return $this->generateUrl($path, '/'); + if ($path[0] == '/') + $path = substr($path, 1); + return $this->generateUrl($path, ''); } /**