From 5048b0e528b033aa1f0f52a027a85b7895d6d796 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 6 Nov 2023 08:06:11 +0000 Subject: [PATCH] Fix BrowsershotFunction for Laravel 8 --- src/Functions/BrowsershotFunction.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Functions/BrowsershotFunction.php b/src/Functions/BrowsershotFunction.php index 07bc700..71fe7fc 100644 --- a/src/Functions/BrowsershotFunction.php +++ b/src/Functions/BrowsershotFunction.php @@ -2,6 +2,7 @@ namespace Wnx\SidecarBrowsershot\Functions; +use Illuminate\Support\Str; use Hammerstone\Sidecar\Architecture; use Hammerstone\Sidecar\LambdaFunction; use Hammerstone\Sidecar\Package; @@ -34,7 +35,7 @@ public function package() protected function customFonts(): array { $fonts = collect(); - $fontDirectory = str(config('sidecar-browsershot.fonts'))->finish(DIRECTORY_SEPARATOR); + $fontDirectory = Str::finish(config('sidecar-browsershot.fonts'), DIRECTORY_SEPARATOR); // Check if the custom fonts folder exists. if (file_exists($fontDirectory)) {