Skip to content

Commit

Permalink
Implement new config() functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 3, 2019
1 parent 0741044 commit 469bdc7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@ public static function audits(BaseConfig $config = null, bool $getShared = true)
return static::getSharedInstance('audits', $config);
endif;

// prioritizes user config in app/Config if found
if (empty($config)):
if (class_exists('\Config\Audits')):
$config = new \Config\Audits();
else:
$config = new \Tatter\Audits\Config\Audits();
endif;
endif;
// If no config was injected then load one
// Prioritizes app/Config if found
if (empty($config))
$config = config('Audits');

return new \Tatter\Audits\Audits($config);
}
Expand Down

0 comments on commit 469bdc7

Please sign in to comment.