Skip to content

Commit

Permalink
Merge pull request #366 from Nowi5/master
Browse files Browse the repository at this point in the history
Update Config Documentation
  • Loading branch information
kaidesu authored Jul 10, 2018
2 parents ad8f776 + 790c673 commit 04ebb6b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion config/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,26 @@
| This driver manages the retrieval and management of module properties.
| Setting this to custom allows you to specify your own driver instance.
|
| Supported: "local"
| Supported: "local" or "custom"
|
*/

'driver' => 'local',

/*
|--------------------------------------------------------------------------
| Custom Module Driver
|--------------------------------------------------------------------------
|
| Using a custom module driver, the 'driver' value need to be set to 'custom'
| The path to the driver need to be set in addition at custom_driver.
|
| @warn: This value will be only considered if driver is set to custom.
|
*/

// 'custom_driver' => 'Caffeinated\Modules\Repositories\LocalRepository',

/*
|--------------------------------------------------------------------------
| Remap Module Subdirectories
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/RepositoryServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function register()
{
$driver = ucfirst(config('modules.driver'));

if ($driver == 'Custom') {
if (strcasecmp($driver, 'custom') == 0) {
$namespace = config('modules.custom_driver');
} else {
$namespace = 'Caffeinated\Modules\Repositories\\'.$driver.'Repository';
Expand Down

0 comments on commit 04ebb6b

Please sign in to comment.