diff --git a/README.md b/README.md index 83b570e..c1954a4 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,36 @@ -# phpvms-plugin +# phpvms-module -Sample/template repository for a phpVMS plugin. +Sample/template repository for a phpVMS plugin. See the full docs here: http://docs.phpvms.net/developers/add-ons-and-modules + +## Generating a new module + +The easiest way to generate a new module for phpVMS is to use the `artisan` command: + +``` +php artisan module:make {ModuleName} +``` + +That will create a module in the `modules` folder, which you can then copy out into its own repository and develop. ## Composer Configuration -The `type` field needs to be set to "phpvms-plugin", and +### Type + +The `type` field needs to be set to "phpvms-module", and ```json -"type": "phpvms-plugin", +"type": "phpvms-module", "require": {} +``` + +### Autoload + +The path to your namespace must be set by the `autoload` section: + +```json +"autoload": { + "psr-4": { + "Modules\\Sample\\": "." + } +} ``` \ No newline at end of file diff --git a/composer.json b/composer.json index b64a0e2..d9b6776 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "phpvms/sample-module", - "type": "phpvms-plugin", - "description": "", + "type": "phpvms-module", + "description": "A sample phpvms module", "require": { "composer/installers": "~1.0" }, @@ -10,10 +10,12 @@ "providers": [ "Modules\\Sample\\Providers\\SampleServiceProvider", "Modules\\Sample\\Providers\\EventServiceProvider" - ], - "aliases": { - - } + ] + } + }, + "autoload": { + "psr-4": { + "Modules\\Sample\\": "." } } }