Skip to content

Commit

Permalink
πŸ”€ Merge pull request #5 from mychidarko/main
Browse files Browse the repository at this point in the history
πŸš‘ fixed config error
  • Loading branch information
mychidarko committed Feb 16, 2022
2 parents 90ce822 + c413911 commit 35db2b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Auth/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,19 @@ protected static function leafDbConnect()
* Set auth config
*
* @param string|array $config The auth config key or array of config
* @param string $value The value if $config is a string
* @param mixed $value The value if $config is a string
*/
public static function config($config, ?string $value = null)
public static function config($config, $value = null)
{
if (is_array($config)) {
foreach ($config as $key => $configValue) {
static::config($key, $configValue);
}
} else {
if (!$value) return static::$settings[$config] ?? null;
if ($value === null) {
return static::$settings[$config] ?? null;
}

static::$settings[$config] = $value;
}
}
Expand Down

0 comments on commit 35db2b4

Please sign in to comment.