From 980dff4caf473827fdb85e4918da2b0b690bc47e Mon Sep 17 00:00:00 2001 From: Dmytro Date: Fri, 12 Jul 2024 00:44:53 +0200 Subject: [PATCH] made ajaxLink property an absolute url When a site is located in subdirectory but not the root folder (site.com/sub/ and not the site.com/) async widgets will send request to root (site.com/arrilot/load-widget and not site.com/sub/arrilot/load-widget) so widgets are not loaded. I changed ajaxLink property of JavascriptFactory to be absolu url that is generated by laravel automatically (e.g. from .env with APP_URL) --- src/Factories/JavascriptFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Factories/JavascriptFactory.php b/src/Factories/JavascriptFactory.php index 445d0e6..8e01bb3 100644 --- a/src/Factories/JavascriptFactory.php +++ b/src/Factories/JavascriptFactory.php @@ -26,6 +26,7 @@ class JavascriptFactory public function __construct(AbstractWidgetFactory $widgetFactory) { $this->widgetFactory = $widgetFactory; + $this->ajaxLink = url($this->ajaxLink); } /**