Get default value on config repository
This commit is contained in:
@@ -45,11 +45,12 @@ class Repository
|
||||
* Returns a setting from the database.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
* @param bool $checkEnv
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function get($name, $checkEnv = true)
|
||||
public function get($name, $default = null, $checkEnv = true)
|
||||
{
|
||||
// if we've not loaded the settings, load them now
|
||||
if (!$this->settings) {
|
||||
@@ -65,6 +66,8 @@ class Repository
|
||||
if ($checkEnv) {
|
||||
return $this->settings[$name] = env(strtoupper($name));
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user