Naming Conventions
Naming Conventions
The naming of load and publish in Laravel is not quite consistent, in my opinion.
In Bootraiser, I use load and publish for each software component. The rule is:
load|register
Load a software component from the package into Laravel.
publish
Publish is used to copy software components from the package into Laravel.
Software Components
The software components that are loaded or/and offered as publishable are also named exactly as they are named in Laravel.
Good to know
That means for every Software Component that is loadable or publishable the same naming structure. There are two ways to configure and control the bootable aspects of your package.
load and publish with method call
<?php
// both, loadMigrations and publishMigrations don't need.
Raiser::forProvider($this)->Migrations();
// or selective
// load migration
Raiser::forProvider($this)->loadMigrations();
// publishable migration
Raiser::forProvider($this)->publishMigrations();
?>
load and publish with config
<?php
// both, loadMigrations and publishMigrations don't need.
Raiser::forProvider($this)->runFromArray(['Migrations']);
// or selective
// load migration
Raiser::forProvider($this)->runFromArray(['loadMigrations']);
// publishable migration
Raiser::forProvider($this)->runFromArray(['publishMigrations']);
?>
Last updated on