Skip to content

Commit

Permalink
Merge pull request #2377 from dafriend/revise/extending/core_classes
Browse files Browse the repository at this point in the history
Docs Rev: Replacing Core Classes [ci skip]
  • Loading branch information
lonnieezell authored Oct 31, 2019
2 parents 40367d9 + b38e78a commit c20b7d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions user_guide_src/source/extending/core_classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c20b7d7

Please sign in to comment.