interface Application implements Container (View source)
bool | bound(string $abstract) Determine if the given abstract type has been bound. | from Container |
void | alias(string $abstract, string $alias) Alias a type to a different name. | from Container |
void | tag(array|string $abstracts, array|mixed $tags) Assign a set of tags to a given binding. | from Container |
iterable | tagged(string $tag) Resolve all of the bindings for a given tag. | from Container |
void | bind(string $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding with the container. | from Container |
void | bindIf(string $abstract, Closure|string|null $concrete = null, bool $shared = false) Register a binding if it hasn't already been registered. | from Container |
void | singleton(string $abstract, Closure|string|null $concrete = null) Register a shared binding in the container. | from Container |
void | extend(string $abstract, Closure $closure) "Extend" an abstract type in the container. | from Container |
mixed | instance(string $abstract, mixed $instance) Register an existing instance as shared in the container. | from Container |
void | addContextualBinding(string $concrete, string $abstract, Closure|string $implementation) Add a contextual binding to the container. | from Container |
ContextualBindingBuilder | when(string|array $concrete) Define a contextual binding. | from Container |
Closure | factory(string $abstract) Get a closure to resolve the given type from the container. | from Container |
void | flush() Flush the container of all bindings and resolved instances. | from Container |
mixed | make(string $abstract, array $parameters = []) Resolve the given type from the container. | from Container |
mixed | call(callable|string $callback, array $parameters = [], string|null $defaultMethod = null) Call the given Closure / class@method and inject its dependencies. | from Container |
bool | resolved(string $abstract) Determine if the given abstract type has been resolved. | from Container |
void | resolving(Closure|string $abstract, Closure $callback = null) Register a new resolving callback. | from Container |
void | afterResolving(Closure|string $abstract, Closure $callback = null) Register a new after resolving callback. | from Container |
string | version() Get the version number of the application. | |
string | basePath() Get the base path of the Laravel installation. | |
string | bootstrapPath(string $path = '') Get the path to the bootstrap directory. | |
string | configPath(string $path = '') Get the path to the application configuration files. | |
string | databasePath(string $path = '') Get the path to the database directory. | |
string | environmentPath() Get the path to the environment file directory. | |
string | resourcePath(string $path = '') Get the path to the resources directory. | |
string | storagePath() Get the path to the storage directory. | |
string|bool | environment(string|array ...$environments) Get or check the current application environment. | |
bool | runningInConsole() Determine if the application is running in the console. | |
bool | runningUnitTests() Determine if the application is running unit tests. | |
bool | isDownForMaintenance() Determine if the application is currently down for maintenance. | |
void | registerConfiguredProviders() Register all of the configured providers. | |
ServiceProvider | register(ServiceProvider|string $provider, bool $force = false) Register a service provider with the application. | |
void | registerDeferredProvider(string $provider, string|null $service = null) Register a deferred provider and service. | |
ServiceProvider | resolveProvider(string $provider) Resolve a service provider instance from the class name. | |
void | boot() Boot the application's service providers. | |
void | booting(callable $callback) Register a new boot listener. | |
void | booted(callable $callback) Register a new "booted" listener. | |
void | bootstrapWith(array $bootstrappers) Run the given array of bootstrap classes. | |
bool | configurationIsCached() Determine if the application configuration is cached. | |
string | detectEnvironment(Closure $callback) Detect the application's current environment. | |
string | environmentFile() Get the environment file the application is using. | |
string | environmentFilePath() Get the fully qualified path to the environment file. | |
string | getCachedConfigPath() Get the path to the configuration cache file. | |
string | getCachedServicesPath() Get the path to the cached services.php file. | |
string | getCachedPackagesPath() Get the path to the cached packages.php file. | |
string | getCachedRoutesPath() Get the path to the routes cache file. | |
string | getLocale() Get the current application locale. | |
string | getNamespace() Get the application namespace. | |
array | getProviders(ServiceProvider|string $provider) Get the registered service provider instances if any exist. | |
bool | hasBeenBootstrapped() Determine if the application has been bootstrapped before. | |
void | loadDeferredProviders() Load and boot all of the remaining deferred providers. | |
$this | loadEnvironmentFrom(string $file) Set the environment file to be loaded during bootstrapping. | |
bool | routesAreCached() Determine if the application routes are cached. | |
void | setLocale(string $locale) Set the current application locale. | |
bool | shouldSkipMiddleware() Determine if middleware has been disabled for the application. | |
void | terminate() Terminate the application. |
Determine if the given abstract type has been bound.
Alias a type to a different name.
Assign a set of tags to a given binding.
Resolve all of the bindings for a given tag.
Register a binding with the container.
Register a binding if it hasn't already been registered.
Register a shared binding in the container.
"Extend" an abstract type in the container.
Register an existing instance as shared in the container.
Add a contextual binding to the container.
Define a contextual binding.
Get a closure to resolve the given type from the container.
Flush the container of all bindings and resolved instances.
Resolve the given type from the container.
Call the given Closure / class@method and inject its dependencies.
Determine if the given abstract type has been resolved.
Register a new resolving callback.
Register a new after resolving callback.
Get the version number of the application.
Get the base path of the Laravel installation.
Get the path to the bootstrap directory.
Get the path to the application configuration files.
Get the path to the database directory.
Get the path to the environment file directory.
Get the path to the resources directory.
Get the path to the storage directory.
Get or check the current application environment.
Determine if the application is running in the console.
Determine if the application is running unit tests.
Determine if the application is currently down for maintenance.
Register all of the configured providers.
Register a service provider with the application.
Register a deferred provider and service.
Resolve a service provider instance from the class name.
Boot the application's service providers.
Register a new boot listener.
Register a new "booted" listener.
Run the given array of bootstrap classes.
Determine if the application configuration is cached.
Detect the application's current environment.
Get the environment file the application is using.
Get the fully qualified path to the environment file.
Get the path to the configuration cache file.
Get the path to the cached services.php file.
Get the path to the cached packages.php file.
Get the path to the routes cache file.
Get the current application locale.
Get the application namespace.
Get the registered service provider instances if any exist.
Determine if the application has been bootstrapped before.
Load and boot all of the remaining deferred providers.
Set the environment file to be loaded during bootstrapping.
Determine if the application routes are cached.
Set the current application locale.
Determine if middleware has been disabled for the application.
Terminate the application.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Contracts/Foundation/Application.html