diff --git a/src/functions.php b/src/functions.php index 3a7e493..c32903e 100644 --- a/src/functions.php +++ b/src/functions.php @@ -8,10 +8,12 @@ */ function form(): \Leaf\Form { - if (!(\Leaf\Config::get('form.instance'))) { - \Leaf\Config::set('form.instance', new \Leaf\Form()); + if (!(\Leaf\Config::getStatic('form'))) { + \Leaf\Config::singleton('form', function () { + return new \Leaf\Form(); + }); } - return \Leaf\Config::get('form.instance'); + return \Leaf\Config::get('form'); } }