ServiceProvider::compiles()

static array compiles() Get a list of files that should be compiled for the package. Return Value array

ServiceProvider::commands()

void commands(array|mixed $commands) Register the package's custom Artisan commands. Parameters array|mixed $commands Return Value void

ServiceProvider

ServiceProvider class ServiceProvider (View source) Methods void __construct(Application $app) Create a new service provider instance. static array pathsToPublish(string $provider = null, string $group = null) Get the paths to publish. void commands(array|mixed $commands) Register the package's custom Artisan commands. array provides() Get the services provided by the provider. array when() Get the events that trigger this service provider to register. bool isDefe

Service Providers

Service Providers Introduction Writing Service Providers The Register Method The Boot Method Registering Providers Deferred Providers Introduction Service providers are the central place of all Laravel application bootstrapping. Your own application, as well as all of Laravel's core services are bootstrapped via service providers. But, what do we mean by "bootstrapped"? In general, we mean registering things, including registering service container bindings, event listeners, middleware, and

Service Container

Service Container Introduction Binding Binding Basics Binding Interfaces To Implementations Contextual Binding Tagging Resolving The Make Method Automatic Injection Container Events Introduction The Laravel service container is a powerful tool for managing class dependencies and performing dependency injection. Dependency injection is a fancy phrase that essentially means this: class dependencies are "injected" into the class via the constructor or, in some cases, "setter" methods. Let's

ServerServiceProvider::__construct()

void __construct(Application $app) Create a new service provider instance. Parameters Application $app Return Value void

ServerServiceProvider::when()

array when() Get the events that trigger this service provider to register. Return Value array

ServerServiceProvider::register()

void register() Register the service provider. Return Value void

ServerServiceProvider::provides()

array provides() Get the services provided by the provider. Return Value array

ServerServiceProvider::package()

void package(string $package, string $namespace = null, string $path = null) Register the package's component namespaces. Parameters string $package string $namespace string $path Return Value void