From 201f99415a28db8a612ac47cde7a004eae4b2bb5 Mon Sep 17 00:00:00 2001 From: Marco Mantovani Date: Mon, 28 Dec 2015 20:38:28 +0100 Subject: [PATCH] Add backslash in str_replace Hi all, In my case asset function, when used, it adds a wrong "\" (backslash) in the path. Adding .'\\' it works, it's correct? If i'm wrong, could you explain me what can be my error? Thanks. --- Repository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Repository.php b/Repository.php index 0302287..0f0981b 100644 --- a/Repository.php +++ b/Repository.php @@ -482,7 +482,7 @@ public function asset($asset) { list($name, $url) = explode(':', $asset); - $baseUrl = str_replace(public_path(), '', $this->getAssetsPath()); + $baseUrl = str_replace(public_path().'\\', '', $this->getAssetsPath()); $url = $this->app['url']->asset($baseUrl."/{$name}/".$url);