ApplicationBuilder
class ApplicationBuilder
Properties
| protected array | $pendingProviders | The service providers that are marked for registration. |
|
| protected array | $additionalRoutingCallbacks | Any additional routing callbacks that should be invoked while registering routes. |
Methods
Register the standard kernel classes for the application.
Register additional service providers.
Register the core event service provider for the application.
Register the broadcasting services for the application.
Register the routing services for the application.
Create the routing callback for the application.
Register the global middleware, middleware groups, and middleware aliases for the application.
Register additional Artisan commands with the application.
Register additional Artisan route paths.
Register the scheduled tasks for the application.
Register and configure the application's exception handler.
Register an array of container bindings to be bound when the application is booting.
Register an array of singleton container bindings to be bound when the application is booting.
Register an array of scoped singleton container bindings to be bound when the application is booting.
Globally prefer JSON responses when the incoming "Accept" header is broad.
Register a callback to be invoked when the application's service providers are registered.
Register a callback to be invoked when the application is "booting".
Register a callback to be invoked when the application is "booted".
Get the application instance.
Details
at line 40
__construct(Application $app)
Create a new application builder instance.
at line 51
ApplicationBuilder
withKernels()
Register the standard kernel classes for the application.
Boot-only. Re-registering the kernels replaces shared bindings and can discard middleware or console configuration used by subsequent requests and commands.
at line 75
ApplicationBuilder
withProviders(array $providers = [], bool $withBootstrapProviders = true)
Register additional service providers.
at line 92
ApplicationBuilder
withEvents(iterable|bool $discover = true)
Register the core event service provider for the application.
at line 116
ApplicationBuilder
withBroadcasting(string $channels, array $attributes = [])
Register the broadcasting services for the application.
at line 132
ApplicationBuilder
withRouting(Closure|null $using = null, array|string|null $web = null, array|string|null $api = null, string|null $commands = null, string|null $channels = null, string|null $health = null, string $apiPrefix = 'api', callable|null $then = null)
Register the routing services for the application.
at line 170
protected Closure
buildRoutingCallback(array|string|null $web, array|string|null $api, string|null $health, string $apiPrefix, callable|null $then)
Create the routing callback for the application.
at line 221
ApplicationBuilder
withMiddleware(callable|null $callback = null)
Register the global middleware, middleware groups, and middleware aliases for the application.
at line 264
ApplicationBuilder
withCommands(array $commands = [])
Register additional Artisan commands with the application.
at line 287
protected ApplicationBuilder
withCommandRouting(array $paths)
Register additional Artisan route paths.
at line 299
ApplicationBuilder
withSchedule(callable $callback)
Register the scheduled tasks for the application.
at line 320
ApplicationBuilder
withExceptions(callable|null $using = null)
Register and configure the application's exception handler.
Boot-only. The exception handler binding and resolution callback persist in the application container and affect subsequent requests.
at line 341
ApplicationBuilder
withBindings(array $bindings)
Register an array of container bindings to be bound when the application is booting.
at line 353
ApplicationBuilder
withSingletons(array $singletons)
Register an array of singleton container bindings to be bound when the application is booting.
at line 369
ApplicationBuilder
withScopedSingletons(array $scopedSingletons)
Register an array of scoped singleton container bindings to be bound when the application is booting.
at line 385
ApplicationBuilder
prefersJsonResponses(bool $prefer = true)
Globally prefer JSON responses when the incoming "Accept" header is broad.
at line 401
ApplicationBuilder
registered(callable $callback)
Register a callback to be invoked when the application's service providers are registered.
at line 411
ApplicationBuilder
booting(callable $callback)
Register a callback to be invoked when the application is "booting".
at line 421
ApplicationBuilder
booted(callable $callback)
Register a callback to be invoked when the application is "booted".
at line 431
Application
create()
Get the application instance.