pingpong-labs / modules

Laravel 5 Modules
https://pingpong-labs.github.io/docs/modules.html
BSD 3-Clause "New" or "Revised" License
576 stars 151 forks source link

[Enhancement] create a global modules.json into Storage #240

Open zorx opened 8 years ago

zorx commented 8 years ago

I think that it would be a great idea to create a new modules.json file into storage_path() and store active:true/false (and remove this attribute from the current module.json of course) for each module inside, for example :

in config.php inside paths

'paths' => [
...
'manifest' => storage_path() . '/modules.json',
...
]

content of modules.json

{
    "Blog": true,
    "Acme": false
}

this enhancement will allow us to better protect our modules and not change their permissions, to use methods like $module->enable() & $module->disable()