diff --git a/src/functions.php b/src/functions.php index da352f6..7c0654f 100644 --- a/src/functions.php +++ b/src/functions.php @@ -8,11 +8,13 @@ */ function auth() { - if (!(\Leaf\Config::get('auth.instance'))) { - \Leaf\Config::set('auth.instance', new Leaf\Auth()); + if (!(\Leaf\Config::getStatic('auth'))) { + \Leaf\Config::singleton('auth', function () { + return new \Leaf\Auth(); + }); } - return \Leaf\Config::get('auth.instance'); + return \Leaf\Config::getStatic('auth'); } }