interface Illuminate / Contracts / Foundation / Application
You are viewing an older version of the documentation. For the latest, please visit master documentation.

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

resourcePath ( $path ) : string

Get the path to the resources directory.

Parameters

  • $path string
public

storagePath ( ) : string

Get the path to the storage directory.

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

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

terminate ( ) : void

Terminate the application.