ServiceProvider
Properties
$bootingCallbacks array
All of the registered booting callbacks.
$bootedCallbacks array
All of the registered booted callbacks.
$publishes array
The paths that should be published.
$publishGroups array
The paths that should be published by group.
Methods
__construct ( $app ) : void
Create a new service provider instance.
Parameters
- $app Application
register ( ) : void
Register any application services.
booting ( Closure $callback ) : void
Register a booting callback to be run before the "boot" method is called.
Parameters
- $callback Closure
booted ( Closure $callback ) : void
Register a booted callback to be run after the "boot" method is called.
Parameters
- $callback Closure
callBootingCallbacks ( ) : void
Call the registered booting callbacks.
callBootedCallbacks ( ) : void
Call the registered booted callbacks.
mergeConfigFrom ( $path , $key ) : void
Merge the given configuration with the existing configuration.
Parameters
- $path string
- $key string
loadRoutesFrom ( $path ) : void
Load the given routes file if routes are not already cached.
Parameters
- $path string
loadViewsFrom ( $path , $namespace ) : void
Register a view file namespace.
Parameters
- $path string|array
- $namespace string
loadViewComponentsAs ( $prefix , array $components ) : void
Register the given view components with a custom prefix.
Parameters
- $prefix string
- $components array
loadTranslationsFrom ( $path , $namespace ) : void
Register a translation file namespace.
Parameters
- $path string
- $namespace string
loadJsonTranslationsFrom ( $path ) : void
Register a JSON translation file path.
Parameters
- $path string
loadMigrationsFrom ( $paths ) : void
Register database migration paths.
Parameters
- $paths array|string
loadFactoriesFrom ( $paths ) : void
Register Eloquent model factory paths.
Parameters
- $paths array|string
callAfterResolving ( $name , $callback ) : void
Setup an after resolving listener, or fire immediately if already resolved.
Parameters
- $name string
- $callback callable
publishes ( array $paths , $groups ) : void
Register paths to be published by the publish command.
Parameters
- $paths array
- $groups mixed
ensurePublishArrayInitialized ( $class ) : void
Ensure the publish array for the service provider is initialized.
Parameters
- $class string
addPublishGroup ( $group , $paths ) : void
Add a publish group / tag to the service provider.
Parameters
- $group string
- $paths array
pathsToPublish ( $provider , $group ) : array
Get the paths to publish.
Parameters
- $provider string|null
- $group string|null
pathsForProviderOrGroup ( $provider , $group ) : array
Get the paths for the provider or group (or both).
Parameters
- $provider string|null
- $group string|null
pathsForProviderAndGroup ( $provider , $group ) : array
Get the paths for the provider and group.
Parameters
- $provider string
- $group string
publishableProviders ( ) : array
Get the service providers available for publishing.
publishableGroups ( ) : array
Get the groups available for publishing.
commands ( $commands ) : void
Register the package's custom Artisan commands.
Parameters
- $commands array|mixed
provides ( ) : array
Get the services provided by the provider.
when ( ) : array
Get the events that trigger this service provider to register.
isDeferred ( ) : bool
Determine if the provider is deferred.