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
2
2
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.
4
14
5
15
## Composer Configuration
6
16
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
8
20
9
21
``` json
10
- "type" : " phpvms-plugin " ,
22
+ "type" : " phpvms-module " ,
11
23
"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
+ }
12
36
```
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " phpvms/sample-module" ,
3
- "type" : " phpvms-plugin " ,
4
- "description" : " " ,
3
+ "type" : " phpvms-module " ,
4
+ "description" : " A sample phpvms module " ,
5
5
"require" : {
6
6
"composer/installers" : " ~1.0"
7
7
},
10
10
"providers" : [
11
11
" Modules\\ Sample\\ Providers\\ SampleServiceProvider" ,
12
12
" Modules\\ Sample\\ Providers\\ EventServiceProvider"
13
- ],
14
- "aliases" : {
15
-
16
- }
13
+ ]
14
+ }
15
+ },
16
+ "autoload" : {
17
+ "psr-4" : {
18
+ "Modules\\ Sample\\ " : " ."
17
19
}
18
20
}
19
21
}
You can’t perform that action at this time.
0 commit comments