@@ -31,6 +31,10 @@ public function register()
3131 $ this ->app ->bind ('arrilot.async-widget ' , function () {
3232 return new AsyncWidgetFactory (new LaravelApplicationWrapper ());
3333 });
34+
35+ $ this ->app ->singleton ('arrilot.widget-group-collection ' , function () {
36+ return new WidgetGroupCollection (new LaravelApplicationWrapper ());
37+ });
3438
3539 $ this ->app ->singleton ('command.widget.make ' , function ($ app ) {
3640 return new WidgetMakeCommand ($ app ['files ' ]);
@@ -40,6 +44,7 @@ public function register()
4044
4145 $ this ->app ->alias ('arrilot.widget ' , 'Arrilot\Widgets\Factories\WidgetFactory ' );
4246 $ this ->app ->alias ('arrilot.async-widget ' , 'Arrilot\Widgets\Factories\AsyncWidgetFactory ' );
47+ $ this ->app ->alias ('arrilot.widget-group-collection ' , 'Arrilot\Widgets\WidgetGroupCollection ' );
4348 }
4449
4550 /**
@@ -67,7 +72,7 @@ public function boot()
6772 $ this ->registerBladeDirective ('widget ' , '$1<?php echo app("arrilot.widget")->run$2; ?> ' );
6873 $ this ->registerBladeDirective ('async-widget ' , '$1<?php echo app("arrilot.async-widget")->run$2; ?> ' );
6974 $ this ->registerBladeDirective ('asyncWidget ' , '$1<?php echo app("arrilot.async-widget")->run$2; ?> ' );
70- $ this ->registerBladeDirective ('widgetGroup ' , '$1<?php echo Widget:: group$2->display(); ?> ' );
75+ $ this ->registerBladeDirective ('widgetGroup ' , '$1<?php echo app("arrilot.widget-group-collection")-> group$2->display(); ?> ' );
7176 }
7277
7378 /**
0 commit comments