File tree Expand file tree Collapse file tree 2 files changed +36
-10
lines changed Expand file tree Collapse file tree 2 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 1- # phpvms-plugin
1+ # phpvms-module
22
3- Sample/template repository for a phpVMS plugin.
3+ Sample/template repository for a phpVMS plugin. See the full docs here: http://docs.phpvms.net/developers/add-ons-and-modules
4+
5+ ## Generating a new module
6+
7+ The easiest way to generate a new module for phpVMS is to use the ` artisan ` command:
8+
9+ ```
10+ php artisan module:make {ModuleName}
11+ ```
12+
13+ That will create a module in the ` modules ` folder, which you can then copy out into its own repository and develop.
414
515## Composer Configuration
616
7- The ` type ` field needs to be set to "phpvms-plugin", and
17+ ### Type
18+
19+ The ` type ` field needs to be set to "phpvms-module", and
820
921``` json
10- "type" : " phpvms-plugin " ,
22+ "type" : " phpvms-module " ,
1123"require" : {}
24+ ```
25+
26+ ### Autoload
27+
28+ The path to your namespace must be set by the ` autoload ` section:
29+
30+ ``` json
31+ "autoload" : {
32+ "psr-4" : {
33+ "Modules\\ Sample\\ " : " ."
34+ }
35+ }
1236```
Original file line number Diff line number Diff line change 11{
22 "name" : " phpvms/sample-module" ,
3- "type" : " phpvms-plugin " ,
4- "description" : " " ,
3+ "type" : " phpvms-module " ,
4+ "description" : " A sample phpvms module " ,
55 "require" : {
66 "composer/installers" : " ~1.0"
77 },
1010 "providers" : [
1111 " Modules\\ Sample\\ Providers\\ SampleServiceProvider" ,
1212 " Modules\\ Sample\\ Providers\\ EventServiceProvider"
13- ],
14- "aliases" : {
15-
16- }
13+ ]
14+ }
15+ },
16+ "autoload" : {
17+ "psr-4" : {
18+ "Modules\\ Sample\\ " : " ."
1719 }
1820 }
1921}
You can’t perform that action at this time.
0 commit comments