App::config
Usage
mixed App::config(string $key, [?stsring $default = null])Description
Retrieve the value of a configuration variable.Parameters
Parameter | Required | Type | Description |
---|---|---|---|
$key | Yes | string | The alias of the configuration variable, formatted as PACKAGE.ALIAS |
$default | No | ?string | The value to return if the key does not exist as a configuration variable |
Return Value
The value of the configuration variable.Examples
Get values of configuration variables
$column = $app->config('users.username_column');
$domain = $app->config('core.domain_name');