Pages · Laravilt
Traits
Concerns that load a plugin's migrations, translations, views, assets and commands.
The concerns in Laravilt\Plugins\Concerns wrap Laravel's ServiceProvider helpers (loadMigrationsFrom(), loadTranslationsFrom(), loadViewsFrom(), publishes(), commands()). Use them in your plugin's service provider, not in the PluginProvider class.
php
The generated service provider already calls the plain Laravel helpers, so these traits are optional.
Reference
| Trait | Methods |
|---|---|
HasMigrations | migrations(array), getMigrations(), loadMigrations() |
HasTranslations | translations(array $namespaces), getTranslationNamespaces(), loadTranslations() |
HasViews | viewNamespace(string), getViewNamespace(), loadViews(), publishViews() |
HasAssets | assets(array), assetsPath(string) (default dist), getAssets(), getAssetsPath(), publishAssets() |
HasCommands | pluginCommands(array), getPluginCommands(), registerPluginCommands() |
HasComponents | components(array), getComponents(), registerComponents() |