Skip to content

Commit 90d5f04

Browse files
committed
Add Skeleton autoload advice
1 parent 20c92b8 commit 90d5f04

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ and you'll need to do another compose install to install the Laravel project's d
4848
./skeleton/bin/project use {skeleton-name}
4949
```
5050
51+
## Autoload
52+
When you use a skeleton, it will overwrite the default root composer.json file and the commands for generating the project will no longer be available. To fix this, you need to autoload the skeleton folder using psr-4. Like this:
53+
54+
```json
55+
{
56+
"autoload": {
57+
"psr-4": {
58+
"App\\": "app/",
59+
"Core\\": "core/",
60+
"Skeleton\\": "skeleton/",
61+
"Database\\Factories\\": "database/factories/",
62+
"Database\\Seeders\\": "database/seeders/"
63+
}
64+
}
65+
}
66+
```
67+
68+
**Tip: don't forget to run composer dump-autoload afterward.**
69+
5170
Once you have built your skeleton and are satisfied with your work, you can generate a project and all the modifications you have made will be added only to the skeleton you have created.
5271

5372
```bash

0 commit comments

Comments
 (0)