interface Illuminate / Contracts / Foundation / Application
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Application

Methods

public

version ( ) : string

Get the version number of the application.

public

basePath ( $path ) : string

Get the base path of the Laravel installation.

Parameters

  • $path string
public

bootstrapPath ( $path ) : string

Get the path to the bootstrap directory.

Parameters

  • $path string
public

configPath ( $path ) : string

Get the path to the application configuration files.

Parameters

  • $path string
public

databasePath ( $path ) : string

Get the path to the database directory.

Parameters

  • $path string
public

langPath ( $path ) : string

Get the path to the language files.

Parameters

  • $path string
public

publicPath ( $path ) : string

Get the path to the public directory.

Parameters

  • $path string
public

resourcePath ( $path ) : string

Get the path to the resources directory.

Parameters

  • $path string
public

storagePath ( $path ) : string

Get the path to the storage directory.

Parameters

  • $path string
public

environment ( $environments ) : string|bool

Get or check the current application environment.

Parameters

  • $environments string|array
public

runningInConsole ( ) : bool

Determine if the application is running in the console.

public

runningUnitTests ( ) : bool

Determine if the application is running unit tests.

public

hasDebugModeEnabled ( ) : bool

Determine if the application is running with debug mode enabled.

public

maintenanceMode ( ) : MaintenanceMode

Get an instance of the maintenance mode manager implementation.

public

isDownForMaintenance ( ) : bool

Determine if the application is currently down for maintenance.

public

registerConfiguredProviders ( ) : void

Register all of the configured providers.

public

register ( $provider , $force ) : ServiceProvider

Register a service provider with the application.

Parameters

public

registerDeferredProvider ( $provider , $service ) : void

Register a deferred provider and service.

Parameters

  • $provider string
  • $service string|null
public

resolveProvider ( $provider ) : ServiceProvider

Resolve a service provider instance from the class name.

Parameters

  • $provider string
public

boot ( ) : void

Boot the application's service providers.

public

booting ( $callback ) : void

Register a new boot listener.

Parameters

  • $callback callable
public

booted ( $callback ) : void

Register a new "booted" listener.

Parameters

  • $callback callable
public

bootstrapWith ( array $bootstrappers ) : void

Run the given array of bootstrap classes.

Parameters

  • $bootstrappers array
public

getLocale ( ) : string

Get the current application locale.

public

getNamespace ( ) : string

Get the application namespace.

public

getProviders ( $provider ) : array

Get the registered service provider instances if any exist.

Parameters

public

hasBeenBootstrapped ( ) : bool

Determine if the application has been bootstrapped before.

public

loadDeferredProviders ( ) : void

Load and boot all of the remaining deferred providers.

public

setLocale ( $locale ) : void

Set the current application locale.

Parameters

  • $locale string
public

shouldSkipMiddleware ( ) : bool

Determine if middleware has been disabled for the application.

public

terminating ( $callback ) : Application

Register a terminating callback with the application.

Parameters

  • $callback callable|string
public

terminate ( ) : void

Terminate the application.