ArtisanServiceProvider
extends ServiceProvider
in package
Table of Contents
- $publishes : array<string|int, mixed>
- The paths that should be published.
- $publishGroups : array<string|int, mixed>
- The paths that should be published by group.
- $app : Application
- The application instance.
- $commands : array<string|int, mixed>
- The commands to be registered.
- $defer : bool
- Indicates if loading of the provider is deferred.
- $devCommands : array<string|int, mixed>
- The commands to be registered.
- __construct() : void
- Create a new service provider instance.
- commands() : void
- Register the package's custom Artisan commands.
- isDeferred() : bool
- Determine if the provider is deferred.
- pathsToPublish() : array<string|int, mixed>
- Get the paths to publish.
- provides() : array<string|int, mixed>
- Get the services provided by the provider.
- publishableGroups() : array<string|int, mixed>
- Get the groups available for publishing.
- publishableProviders() : array<string|int, mixed>
- Get the service providers available for publishing.
- register() : void
- Register the service provider.
- when() : array<string|int, mixed>
- Get the events that trigger this service provider to register.
- addPublishGroup() : void
- Add a publish group / tag to the service provider.
- ensurePublishArrayInitialized() : void
- Ensure the publish array for the service provider is initialized.
- loadJsonTranslationsFrom() : void
- Register a JSON translation file path.
- loadMigrationsFrom() : void
- Register a database migration path.
- loadRoutesFrom() : void
- Load the given routes file if routes are not already cached.
- loadTranslationsFrom() : void
- Register a translation file namespace.
- loadViewsFrom() : void
- Register a view file namespace.
- mergeConfigFrom() : void
- Merge the given configuration with the existing configuration.
- pathsForProviderAndGroup() : array<string|int, mixed>
- Get the paths for the provider and group.
- pathsForProviderOrGroup() : array<string|int, mixed>
- Get the paths for the provider or group (or both).
- publishes() : void
- Register paths to be published by the publish command.
- registerAppNameCommand() : void
- Register the command.
- registerAuthMakeCommand() : void
- Register the command.
- registerCacheClearCommand() : void
- Register the command.
- registerCacheForgetCommand() : void
- Register the command.
- registerCacheTableCommand() : void
- Register the command.
- registerClearCompiledCommand() : void
- Register the command.
- registerClearResetsCommand() : void
- Register the command.
- registerCommands() : void
- Register the given commands.
- registerConfigCacheCommand() : void
- Register the command.
- registerConfigClearCommand() : void
- Register the command.
- registerConsoleMakeCommand() : void
- Register the command.
- registerControllerMakeCommand() : void
- Register the command.
- registerDownCommand() : void
- Register the command.
- registerEnvironmentCommand() : void
- Register the command.
- registerEventGenerateCommand() : void
- Register the command.
- registerEventMakeCommand() : void
- Register the command.
- registerExceptionMakeCommand() : void
- Register the command.
- registerFactoryMakeCommand() : void
- Register the command.
- registerJobMakeCommand() : void
- Register the command.
- registerKeyGenerateCommand() : void
- Register the command.
- registerListenerMakeCommand() : void
- Register the command.
- registerMailMakeCommand() : void
- Register the command.
- registerMiddlewareMakeCommand() : void
- Register the command.
- registerMigrateCommand() : void
- Register the command.
- registerMigrateFreshCommand() : void
- Register the command.
- registerMigrateInstallCommand() : void
- Register the command.
- registerMigrateMakeCommand() : void
- Register the command.
- registerMigrateRefreshCommand() : void
- Register the command.
- registerMigrateResetCommand() : void
- Register the command.
- registerMigrateRollbackCommand() : void
- Register the command.
- registerMigrateStatusCommand() : void
- Register the command.
- registerModelMakeCommand() : void
- Register the command.
- registerNotificationMakeCommand() : void
- Register the command.
- registerNotificationTableCommand() : void
- Register the command.
- registerOptimizeCommand() : void
- Register the command.
- registerPackageDiscoverCommand() : void
- Register the command.
- registerPolicyMakeCommand() : void
- Register the command.
- registerPresetCommand() : void
- Register the command.
- registerProviderMakeCommand() : void
- Register the command.
- registerQueueFailedCommand() : void
- Register the command.
- registerQueueFailedTableCommand() : void
- Register the command.
- registerQueueFlushCommand() : void
- Register the command.
- registerQueueForgetCommand() : void
- Register the command.
- registerQueueListenCommand() : void
- Register the command.
- registerQueueRestartCommand() : void
- Register the command.
- registerQueueRetryCommand() : void
- Register the command.
- registerQueueTableCommand() : void
- Register the command.
- registerQueueWorkCommand() : void
- Register the command.
- registerRequestMakeCommand() : void
- Register the command.
- registerResourceMakeCommand() : void
- Register the command.
- registerRouteCacheCommand() : void
- Register the command.
- registerRouteClearCommand() : void
- Register the command.
- registerRouteListCommand() : void
- Register the command.
- registerRuleMakeCommand() : void
- Register the command.
- registerScheduleFinishCommand() : void
- Register the command.
- registerScheduleRunCommand() : void
- Register the command.
- registerSeedCommand() : void
- Register the command.
- registerSeederMakeCommand() : void
- Register the command.
- registerServeCommand() : void
- Register the command.
- registerSessionTableCommand() : void
- Register the command.
- registerStorageLinkCommand() : void
- Register the command.
- registerTestMakeCommand() : void
- Register the command.
- registerUpCommand() : void
- Register the command.
- registerVendorPublishCommand() : void
- Register the command.
- registerViewClearCommand() : void
- Register the command.
Properties
$publishes
The paths that should be published.
public
static array<string|int, mixed>
$publishes
= []
$publishGroups
The paths that should be published by group.
public
static array<string|int, mixed>
$publishGroups
= []
$app
The application instance.
protected
Application
$app
$commands
The commands to be registered.
protected
array<string|int, mixed>
$commands
= ['CacheClear' => 'command.cache.clear', 'CacheForget' => 'command.cache.forget', 'ClearCompiled' => 'command.clear-compiled', 'ClearResets' => 'command.auth.resets.clear', 'ConfigCache' => 'command.config.cache', 'ConfigClear' => 'command.config.clear', 'Down' => 'command.down', 'Environment' => 'command.environment', 'KeyGenerate' => 'command.key.generate', 'Migrate' => 'command.migrate', 'MigrateFresh' => 'command.migrate.fresh', 'MigrateInstall' => 'command.migrate.install', 'MigrateRefresh' => 'command.migrate.refresh', 'MigrateReset' => 'command.migrate.reset', 'MigrateRollback' => 'command.migrate.rollback', 'MigrateStatus' => 'command.migrate.status', 'Optimize' => 'command.optimize', 'PackageDiscover' => 'command.package.discover', 'Preset' => 'command.preset', 'QueueFailed' => 'command.queue.failed', 'QueueFlush' => 'command.queue.flush', 'QueueForget' => 'command.queue.forget', 'QueueListen' => 'command.queue.listen', 'QueueRestart' => 'command.queue.restart', 'QueueRetry' => 'command.queue.retry', 'QueueWork' => 'command.queue.work', 'RouteCache' => 'command.route.cache', 'RouteClear' => 'command.route.clear', 'RouteList' => 'command.route.list', 'Seed' => 'command.seed', 'ScheduleFinish' => IlluminateConsoleSchedulingScheduleFinishCommand::class, 'ScheduleRun' => IlluminateConsoleSchedulingScheduleRunCommand::class, 'StorageLink' => 'command.storage.link', 'Up' => 'command.up', 'ViewClear' => 'command.view.clear']
$defer
Indicates if loading of the provider is deferred.
protected
bool
$defer
= true
$devCommands
The commands to be registered.
protected
array<string|int, mixed>
$devCommands
= ['AppName' => 'command.app.name', 'AuthMake' => 'command.auth.make', 'CacheTable' => 'command.cache.table', 'ConsoleMake' => 'command.console.make', 'ControllerMake' => 'command.controller.make', 'EventGenerate' => 'command.event.generate', 'EventMake' => 'command.event.make', 'ExceptionMake' => 'command.exception.make', 'FactoryMake' => 'command.factory.make', 'JobMake' => 'command.job.make', 'ListenerMake' => 'command.listener.make', 'MailMake' => 'command.mail.make', 'MiddlewareMake' => 'command.middleware.make', 'MigrateMake' => 'command.migrate.make', 'ModelMake' => 'command.model.make', 'NotificationMake' => 'command.notification.make', 'NotificationTable' => 'command.notification.table', 'PolicyMake' => 'command.policy.make', 'ProviderMake' => 'command.provider.make', 'QueueFailedTable' => 'command.queue.failed-table', 'QueueTable' => 'command.queue.table', 'RequestMake' => 'command.request.make', 'ResourceMake' => 'command.resource.make', 'RuleMake' => 'command.rule.make', 'SeederMake' => 'command.seeder.make', 'SessionTable' => 'command.session.table', 'Serve' => 'command.serve', 'TestMake' => 'command.test.make', 'VendorPublish' => 'command.vendor.publish']
Methods
__construct()
Create a new service provider instance.
public
__construct(Application $app) : void
Parameters
- $app : Application
Return values
void —commands()
Register the package's custom Artisan commands.
public
commands(array<string|int, mixed>|mixed $commands) : void
Parameters
- $commands : array<string|int, mixed>|mixed
Return values
void —isDeferred()
Determine if the provider is deferred.
public
isDeferred() : bool
Return values
bool —pathsToPublish()
Get the paths to publish.
public
static pathsToPublish([string $provider = null ][, string $group = null ]) : array<string|int, mixed>
Parameters
- $provider : string = null
- $group : string = null
Return values
array<string|int, mixed> —provides()
Get the services provided by the provider.
public
provides() : array<string|int, mixed>
Return values
array<string|int, mixed> —publishableGroups()
Get the groups available for publishing.
public
static publishableGroups() : array<string|int, mixed>
Return values
array<string|int, mixed> —publishableProviders()
Get the service providers available for publishing.
public
static publishableProviders() : array<string|int, mixed>
Return values
array<string|int, mixed> —register()
Register the service provider.
public
register() : void
Return values
void —when()
Get the events that trigger this service provider to register.
public
when() : array<string|int, mixed>
Return values
array<string|int, mixed> —addPublishGroup()
Add a publish group / tag to the service provider.
protected
addPublishGroup(string $group, array<string|int, mixed> $paths) : void
Parameters
- $group : string
- $paths : array<string|int, mixed>
Return values
void —ensurePublishArrayInitialized()
Ensure the publish array for the service provider is initialized.
protected
ensurePublishArrayInitialized(string $class) : void
Parameters
- $class : string
Return values
void —loadJsonTranslationsFrom()
Register a JSON translation file path.
protected
loadJsonTranslationsFrom(string $path) : void
Parameters
- $path : string
Return values
void —loadMigrationsFrom()
Register a database migration path.
protected
loadMigrationsFrom(array<string|int, mixed>|string $paths) : void
Parameters
- $paths : array<string|int, mixed>|string
Return values
void —loadRoutesFrom()
Load the given routes file if routes are not already cached.
protected
loadRoutesFrom(string $path) : void
Parameters
- $path : string
Return values
void —loadTranslationsFrom()
Register a translation file namespace.
protected
loadTranslationsFrom(string $path, string $namespace) : void
Parameters
- $path : string
- $namespace : string
Return values
void —loadViewsFrom()
Register a view file namespace.
protected
loadViewsFrom(string|array<string|int, mixed> $path, string $namespace) : void
Parameters
- $path : string|array<string|int, mixed>
- $namespace : string
Return values
void —mergeConfigFrom()
Merge the given configuration with the existing configuration.
protected
mergeConfigFrom(string $path, string $key) : void
Parameters
- $path : string
- $key : string
Return values
void —pathsForProviderAndGroup()
Get the paths for the provider and group.
protected
static pathsForProviderAndGroup(string $provider, string $group) : array<string|int, mixed>
Parameters
- $provider : string
- $group : string
Return values
array<string|int, mixed> —pathsForProviderOrGroup()
Get the paths for the provider or group (or both).
protected
static pathsForProviderOrGroup(string|null $provider, string|null $group) : array<string|int, mixed>
Parameters
- $provider : string|null
- $group : string|null
Return values
array<string|int, mixed> —publishes()
Register paths to be published by the publish command.
protected
publishes(array<string|int, mixed> $paths[, string $group = null ]) : void
Parameters
- $paths : array<string|int, mixed>
- $group : string = null
Return values
void —registerAppNameCommand()
Register the command.
protected
registerAppNameCommand() : void
Return values
void —registerAuthMakeCommand()
Register the command.
protected
registerAuthMakeCommand() : void
Return values
void —registerCacheClearCommand()
Register the command.
protected
registerCacheClearCommand() : void
Return values
void —registerCacheForgetCommand()
Register the command.
protected
registerCacheForgetCommand() : void
Return values
void —registerCacheTableCommand()
Register the command.
protected
registerCacheTableCommand() : void
Return values
void —registerClearCompiledCommand()
Register the command.
protected
registerClearCompiledCommand() : void
Return values
void —registerClearResetsCommand()
Register the command.
protected
registerClearResetsCommand() : void
Return values
void —registerCommands()
Register the given commands.
protected
registerCommands(array<string|int, mixed> $commands) : void
Parameters
- $commands : array<string|int, mixed>
Return values
void —registerConfigCacheCommand()
Register the command.
protected
registerConfigCacheCommand() : void
Return values
void —registerConfigClearCommand()
Register the command.
protected
registerConfigClearCommand() : void
Return values
void —registerConsoleMakeCommand()
Register the command.
protected
registerConsoleMakeCommand() : void
Return values
void —registerControllerMakeCommand()
Register the command.
protected
registerControllerMakeCommand() : void
Return values
void —registerDownCommand()
Register the command.
protected
registerDownCommand() : void
Return values
void —registerEnvironmentCommand()
Register the command.
protected
registerEnvironmentCommand() : void
Return values
void —registerEventGenerateCommand()
Register the command.
protected
registerEventGenerateCommand() : void
Return values
void —registerEventMakeCommand()
Register the command.
protected
registerEventMakeCommand() : void
Return values
void —registerExceptionMakeCommand()
Register the command.
protected
registerExceptionMakeCommand() : void
Return values
void —registerFactoryMakeCommand()
Register the command.
protected
registerFactoryMakeCommand() : void
Return values
void —registerJobMakeCommand()
Register the command.
protected
registerJobMakeCommand() : void
Return values
void —registerKeyGenerateCommand()
Register the command.
protected
registerKeyGenerateCommand() : void
Return values
void —registerListenerMakeCommand()
Register the command.
protected
registerListenerMakeCommand() : void
Return values
void —registerMailMakeCommand()
Register the command.
protected
registerMailMakeCommand() : void
Return values
void —registerMiddlewareMakeCommand()
Register the command.
protected
registerMiddlewareMakeCommand() : void
Return values
void —registerMigrateCommand()
Register the command.
protected
registerMigrateCommand() : void
Return values
void —registerMigrateFreshCommand()
Register the command.
protected
registerMigrateFreshCommand() : void
Return values
void —registerMigrateInstallCommand()
Register the command.
protected
registerMigrateInstallCommand() : void
Return values
void —registerMigrateMakeCommand()
Register the command.
protected
registerMigrateMakeCommand() : void
Return values
void —registerMigrateRefreshCommand()
Register the command.
protected
registerMigrateRefreshCommand() : void
Return values
void —registerMigrateResetCommand()
Register the command.
protected
registerMigrateResetCommand() : void
Return values
void —registerMigrateRollbackCommand()
Register the command.
protected
registerMigrateRollbackCommand() : void
Return values
void —registerMigrateStatusCommand()
Register the command.
protected
registerMigrateStatusCommand() : void
Return values
void —registerModelMakeCommand()
Register the command.
protected
registerModelMakeCommand() : void
Return values
void —registerNotificationMakeCommand()
Register the command.
protected
registerNotificationMakeCommand() : void
Return values
void —registerNotificationTableCommand()
Register the command.
protected
registerNotificationTableCommand() : void
Return values
void —registerOptimizeCommand()
Register the command.
protected
registerOptimizeCommand() : void
Return values
void —registerPackageDiscoverCommand()
Register the command.
protected
registerPackageDiscoverCommand() : void
Return values
void —registerPolicyMakeCommand()
Register the command.
protected
registerPolicyMakeCommand() : void
Return values
void —registerPresetCommand()
Register the command.
protected
registerPresetCommand() : void
Return values
void —registerProviderMakeCommand()
Register the command.
protected
registerProviderMakeCommand() : void
Return values
void —registerQueueFailedCommand()
Register the command.
protected
registerQueueFailedCommand() : void
Return values
void —registerQueueFailedTableCommand()
Register the command.
protected
registerQueueFailedTableCommand() : void
Return values
void —registerQueueFlushCommand()
Register the command.
protected
registerQueueFlushCommand() : void
Return values
void —registerQueueForgetCommand()
Register the command.
protected
registerQueueForgetCommand() : void
Return values
void —registerQueueListenCommand()
Register the command.
protected
registerQueueListenCommand() : void
Return values
void —registerQueueRestartCommand()
Register the command.
protected
registerQueueRestartCommand() : void
Return values
void —registerQueueRetryCommand()
Register the command.
protected
registerQueueRetryCommand() : void
Return values
void —registerQueueTableCommand()
Register the command.
protected
registerQueueTableCommand() : void
Return values
void —registerQueueWorkCommand()
Register the command.
protected
registerQueueWorkCommand() : void
Return values
void —registerRequestMakeCommand()
Register the command.
protected
registerRequestMakeCommand() : void
Return values
void —registerResourceMakeCommand()
Register the command.
protected
registerResourceMakeCommand() : void
Return values
void —registerRouteCacheCommand()
Register the command.
protected
registerRouteCacheCommand() : void
Return values
void —registerRouteClearCommand()
Register the command.
protected
registerRouteClearCommand() : void
Return values
void —registerRouteListCommand()
Register the command.
protected
registerRouteListCommand() : void
Return values
void —registerRuleMakeCommand()
Register the command.
protected
registerRuleMakeCommand() : void
Return values
void —registerScheduleFinishCommand()
Register the command.
protected
registerScheduleFinishCommand() : void
Return values
void —registerScheduleRunCommand()
Register the command.
protected
registerScheduleRunCommand() : void
Return values
void —registerSeedCommand()
Register the command.
protected
registerSeedCommand() : void
Return values
void —registerSeederMakeCommand()
Register the command.
protected
registerSeederMakeCommand() : void
Return values
void —registerServeCommand()
Register the command.
protected
registerServeCommand() : void
Return values
void —registerSessionTableCommand()
Register the command.
protected
registerSessionTableCommand() : void
Return values
void —registerStorageLinkCommand()
Register the command.
protected
registerStorageLinkCommand() : void
Return values
void —registerTestMakeCommand()
Register the command.
protected
registerTestMakeCommand() : void
Return values
void —registerUpCommand()
Register the command.
protected
registerUpCommand() : void
Return values
void —registerVendorPublishCommand()
Register the command.
protected
registerVendorPublishCommand() : void
Return values
void —registerViewClearCommand()
Register the command.
protected
registerViewClearCommand() : void