abstract class TwillPackageServiceProvider extends ServiceProvider (View source)

Properties

protected $autoRegisterCapsules

Methods

void
boot()

No description

void
registerCapsule(string $name)

No description

void
registerCapsules(string $directory)

No description

string
getClassName()

No description

string
getCapsuleNamespace()

No description

string
getPackageDirectory()

No description

registerVueComponentsDirectory($path)

No description

registerBlocksDirectory($path, string $renderNamespace = null)

Register a blocks directory.

registerRepeatersDirectory($path, string $renderNamespace = null)

No description

Details

void boot()

No description

Return Value

void

protected void registerCapsule(string $name)

No description

Parameters

string $name

Return Value

void

protected void registerCapsules(string $directory)

No description

Parameters

string $directory

Return Value

void

protected string getClassName()

No description

Return Value

string

protected string getCapsuleNamespace()

No description

Return Value

string

protected string getPackageDirectory()

No description

Return Value

string

protected registerVueComponentsDirectory($path)

No description

Parameters

$path

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'),
  ]);

Parameters

$path
string $renderNamespace

protected registerRepeatersDirectory($path, string $renderNamespace = null)

No description

Parameters

$path
string $renderNamespace