From b38e78a4e364c6d806857b2e8185a3bb0cb1adcd Mon Sep 17 00:00:00 2001 From: dafriend Date: Wed, 30 Oct 2019 19:19:43 -0500 Subject: [PATCH] Docs Rev: Replacing Core Classes Changed example code in docs to match what is found in core code --- user_guide_src/source/extending/core_classes.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/extending/core_classes.rst b/user_guide_src/source/extending/core_classes.rst index 698fb1e45ca6..0d22379796e5 100644 --- a/user_guide_src/source/extending/core_classes.rst +++ b/user_guide_src/source/extending/core_classes.rst @@ -59,14 +59,14 @@ the core system class, you would create your class like this:: Then you would modify the ``routes`` service to load your class instead:: - public static function routes($getShared = false) + public static function routes(bool $getShared = true) { - if (! $getShared) + if ($getShared) { - return new \App\Libraries\RouteCollection(); + return static::getSharedInstance('routes'); } - return static::getSharedInstance('routes'); + return new RouteCollection(static::locator(), config('Modules')); } Extending Core Classes