Get default value on config repository

This commit is contained in:
Joseph Cohen
2015-05-20 12:56:59 -05:00
parent 33f6bf167c
commit 10bcbc6169
3 changed files with 7 additions and 4 deletions

View File

@@ -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;
}
/**