diff --git a/src/PackageServiceProvider.php b/src/PackageServiceProvider.php new file mode 100644 index 000000000..d4749d8c3 --- /dev/null +++ b/src/PackageServiceProvider.php @@ -0,0 +1,41 @@ +publishes( + [$path => resource_path(config('twill.vendor_components_resource_path'))], + 'components' + ); + } + + protected function registerBlocksDirectory($path) + { + $blocks = Config::get('twill.block_editor.directories.source.blocks'); + + $blocks[] = [ + 'path' => $path, + 'source' => 'vendor', + ]; + + Config::set('twill.block_editor.directories.source.blocks', $blocks); + } + + protected function registerRepeatersDirectory($path) + { + $repeaters = Config::get('twill.block_editor.directories.source.repeaters'); + + $repeaters[] = [ + 'path' => $path, + 'source' => 'vendor', + ]; + + Config::set('twill.block_editor.directories.source.repeaters', $repeaters); + } +}