diff --git a/src/Providers/ViewServiceProvider.php b/src/Providers/ViewServiceProvider.php index 52959247..6d834e94 100644 --- a/src/Providers/ViewServiceProvider.php +++ b/src/Providers/ViewServiceProvider.php @@ -2,7 +2,6 @@ namespace TightenCo\Jigsaw\Providers; -use Illuminate\View\DynamicComponent; use Illuminate\View\Engines\CompilerEngine; use Illuminate\View\Engines\EngineResolver; use Illuminate\View\Engines\FileEngine; @@ -16,6 +15,7 @@ use TightenCo\Jigsaw\Support\ServiceProvider; use TightenCo\Jigsaw\View\BladeCompiler; use TightenCo\Jigsaw\View\BladeMarkdownEngine; +use TightenCo\Jigsaw\View\DynamicComponent; use TightenCo\Jigsaw\View\MarkdownEngine; use TightenCo\Jigsaw\View\ViewRenderer; diff --git a/src/View/DynamicComponent.php b/src/View/DynamicComponent.php new file mode 100644 index 00000000..6a84338a --- /dev/null +++ b/src/View/DynamicComponent.php @@ -0,0 +1,22 @@ +make('blade.compiler')->getClassComponentAliases(), + Container::getInstance()->make('blade.compiler')->getClassComponentNamespaces(), + Container::getInstance()->make('blade.compiler') + ); + } + + return static::$compiler; + } +} diff --git a/tests/snapshots/dynamic-component/source/_components/alert.blade.php b/tests/snapshots/dynamic-component/source/_components/alert.blade.php new file mode 100644 index 00000000..d521c0a7 --- /dev/null +++ b/tests/snapshots/dynamic-component/source/_components/alert.blade.php @@ -0,0 +1,7 @@ +