From 83fe4adf67efdd494a222648bada705473348b36 Mon Sep 17 00:00:00 2001 From: lvdhoorn Date: Sun, 11 Apr 2021 08:37:44 +0200 Subject: [PATCH] Update TextLinked.php \Nova::path() returns with /. Changed /resources/{$resource->uriKey()} to resources/{$resource->uriKey()} to prevent double //. --- src/TextLinked.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TextLinked.php b/src/TextLinked.php index e83d757..2fd1959 100644 --- a/src/TextLinked.php +++ b/src/TextLinked.php @@ -30,7 +30,7 @@ class TextLinked extends Text */ public function linkResource(string $uirKey, string $id) { - $url = \Nova::path() . "/resources/{$uirKey}/{$id}"; + $url = \Nova::path() . "resources/{$uirKey}/{$id}"; return $this->withMeta(['url' => $url]); } @@ -53,7 +53,7 @@ public function url(string $url) */ public function link($resource) { - $url = \Nova::path() . "/resources/{$resource->uriKey()}/{$resource->id}"; + $url = \Nova::path() . "resources/{$resource->uriKey()}/{$resource->id}"; return $this->withMeta(['url' => $url]); } }