diff --git a/Public.php b/Public.php index 3f4aab8..f15540d 100644 --- a/Public.php +++ b/Public.php @@ -3,20 +3,18 @@ // Public functions -use ComponentLibrary\Init as ComponentLibraryInit; +use HelsingborgStad\GlobalBladeService\GlobalBladeService; if (!function_exists('algolia_search_page_render_blade_view')) { function algolia_search_page_render_blade_view($view, $data = [], $compress = true) { - $init = new ComponentLibraryInit([ + $bladeEngine = GlobalBladeService::getInstance([ ALGOLIAINDEXJSSEARCHPAGE_VIEW_PATH, ]); - $bladeEngine = $init->getEngine(); - try { - $markup = $bladeEngine->make( + $markup = $bladeEngine->makeView( $view, array_merge( $data,