Skip to content

Commit 810d7e4

Browse files
committed
update composer and installation instructions
1 parent 64d20a8 commit 810d7e4

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,28 @@
22

33
Example sprinkle for extending the User class to contain additional fields.
44

5-
## Install
6-
`cd` into the sprinkle directory of UserFrosting and clone as submodule:
5+
# Installation
6+
7+
Edit UserFrosting `app/sprinkles.json` and add the following to the `require` list : `"userfrosting/extend-user": "~4.1.1"`. Also add `extend-user` to the `base` list. For example:
8+
79
```
8-
git submodule add git@github.com:userfrosting/extend-user.git extend-user
10+
{
11+
"require": {
12+
"userfrosting/extend-user": "~4.1.1"
13+
},
14+
"base": [
15+
"core",
16+
"account",
17+
"admin",
18+
"extend-user"
19+
]
20+
}
921
```
1022

11-
### Add to the sprinkle list
12-
Edit UserFrosting `app/sprinkles.json` file and add `extend-user` to the sprinkle list to enable it.
13-
14-
### Update the assets build & composer
23+
### Update Composer
1524

1625
- Run `composer update` from the root project directory.
1726

1827
### Run migration
1928

20-
- Run `php bakery bake` from the root project directory.
29+
- Run `php bakery bake` from the root project directory.

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
22
"name": "userfrosting/extend-user",
3-
"type": "sprinkle",
3+
"type": "userfrosting-sprinkle",
4+
"description": "An example Sprinkle for extending the User model and table with additional fields or relationships.",
5+
"homepage": "https://github.com/userfrosting/extend-user",
46
"license" : "MIT",
57
"authors" : [
68
{
79
"name": "Alexander Weissman",
810
"homepage": "https://alexanderweissman.com"
911
}
1012
],
11-
"version": "1.1.0",
1213
"autoload": {
1314
"psr-4": {
1415
"UserFrosting\\Sprinkle\\ExtendUser\\": "src/"
1516
}
17+
},
18+
"extra": {
19+
"installer-name": "extend-user"
1620
}
1721
}
22+

0 commit comments

Comments
 (0)