Skip to content

Commit

Permalink
Update composer file
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabeel Shahzad committed Feb 28, 2020
1 parent f992022 commit 6332c03
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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\\": "."
}
}
```
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand All @@ -10,10 +10,12 @@
"providers": [
"Modules\\Sample\\Providers\\SampleServiceProvider",
"Modules\\Sample\\Providers\\EventServiceProvider"
],
"aliases": {

}
]
}
},
"autoload": {
"psr-4": {
"Modules\\Sample\\": "."
}
}
}

0 comments on commit 6332c03

Please sign in to comment.