File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ public function getSeo(?string $locale = null)
222222 $ result = $ seo ->get ($ locale );
223223
224224 // Using fallback locale
225- if (! $ result &&
226- ($ fallbackLocale = $ this ->getFallbackLocale ()) &&
225+ if (! $ result &&
226+ ($ fallbackLocale = $ this ->getFallbackLocale ()) &&
227227 ($ fallbackSeo = $ seo ->get ($ fallbackLocale ))
228228 ) {
229229 $ result = $ fallbackSeo ;
Original file line number Diff line number Diff line change @@ -246,8 +246,8 @@ public function __toString(): string
246246 if ($ this ->noFollow ) {
247247 $ robotsContent [] = 'nofollow ' ;
248248 }
249- if (!empty ($ robotsContent )) {
250- $ html .= " <meta name= \ "robots \ " content= \"" . implode (', ' , $ robotsContent ) . "\"> \n" ;
249+ if (! empty ($ robotsContent )) {
250+ $ html .= ' <meta name="robots" content=" ' . implode (', ' , $ robotsContent ) . "\"> \n" ;
251251 }
252252
253253 return $ html ;
@@ -266,11 +266,12 @@ protected function transformImage($value)
266266 if (filter_var ($ value , FILTER_VALIDATE_URL )) {
267267 return $ value ;
268268 }
269-
269+
270270 // If not, check if it is a relative URL (e.g., "/storage/images/example.jpg")
271271 if (str_starts_with ($ value , '/ ' )) {
272272 // Assuming the base URL is defined in your configuration
273273 $ baseUrl = config ('app.url ' , 'http://localhost ' );
274+
274275 return rtrim ($ baseUrl , '/ ' ) . $ value ;
275276 }
276277
@@ -289,7 +290,7 @@ protected function transformImage($value)
289290 } catch (\Throwable $ th ) {
290291 //
291292 }
292-
293+
293294 return null ;
294295 }
295296
You can’t perform that action at this time.
0 commit comments