TwillPackageServiceProvider
abstract class TwillPackageServiceProvider extends ServiceProvider (View source)
Properties
| protected | $autoRegisterCapsules |
Methods
No description
No description
No description
No description
No description
No description
No description
Register a blocks directory.
No description
Details
void
boot()
No description
protected void
registerCapsule(string $name)
No description
protected void
registerCapsules(string $directory)
No description
protected string
getClassName()
No description
protected string
getCapsuleNamespace()
No description
protected string
getPackageDirectory()
No description
protected
registerVueComponentsDirectory($path)
No description
protected
registerBlocksDirectory($path, string $renderNamespace = null)
Register a blocks directory.
If a namespace is provided for the render, Twill will assume it to be under: NAMESPACE::site.blocks.BLOCK-NAME
Given $this->loadViewsFrom(__DIR__ . '/../resources/views/site/blocks', 'package-name');
So if you have a block called "example" and you want your package to provide the
preview. Your file should be in resources\views\site\blocks\example.blade.php.
To make sure the end user can override the views, you should make them publishable:
$this->publishes([
__DIR__ . '/../resources/views' => resource_path('views/vendor/PACKAGE-NAME'),
]);
protected
registerRepeatersDirectory($path, string $renderNamespace = null)
No description