Application
interface Application implements Container (View source)
Methods
Assign a set of tags to a given binding.
Register a binding with the container.
Register a binding if it hasn't already been registered.
Register a shared binding in the container.
Register an existing instance as shared in the container.
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 after resolving callback.
Get the version number of the application.
Get the base path of the Laravel installation.
Get or check the current application environment.
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.
Boot the application's service providers.
Register a new boot listener.
Register a new "booted" listener.
Get the path to the cached "compiled.php" file.
Get the path to the cached services.php file.
Details
void
bind(
string|array $abstract,
Closure|string|null $concrete = null,
bool $shared = false)
Register a binding with the container.
void
bindIf(
string $abstract,
Closure|string|null $concrete = null,
bool $shared = false)
Register a binding if it hasn't already been registered.
void
singleton(
string|array $abstract,
Closure|string|null $concrete = null)
Register a shared binding in the container.
void
instance(
string $abstract,
mixed $instance)
Register an existing instance as shared in the container.
mixed
make(
string $abstract,
array $parameters = array())
Resolve the given type from the container.
mixed
call(
callable|string $callback,
array $parameters = array(),
string|null $defaultMethod = null)
Call the given Closure / class@method and inject its dependencies.
void
afterResolving(
string $abstract,
Closure $callback = null)
Register a new after resolving callback.
at line line 36
bool
isDownForMaintenance()
Determine if the application is currently down for maintenance.
at line line 53
ServiceProvider
register(
ServiceProvider|string $provider,
array $options = array(),
bool $force = false)
Register a service provider with the application.
at line line 62
void
registerDeferredProvider(
string $provider,
string $service = null)
Register a deferred provider and service.