2023-05-27 16:25:19 +00:00
|
|
|
# Install a module package (for private packages)
|
|
|
|
|
|
|
|
To install a module package open ***composer.json***
|
|
|
|
|
|
|
|
|
|
|
|
Add a repositories section :
|
|
|
|
```
|
|
|
|
"repositories": [
|
|
|
|
{
|
|
|
|
"name": "putrakuningan/auth-module",
|
|
|
|
"type": "vcs",
|
2023-05-27 16:26:30 +00:00
|
|
|
"url": "https://git.putrakuningan.com/putrakuningan/auth-module",
|
|
|
|
"branches-path": "api"
|
2023-05-27 16:25:19 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
***branches-path according to what will be installed
|
|
|
|
|
|
|
|
|
|
|
|
And in the ***require*** section type:
|
|
|
|
|
|
|
|
```
|
|
|
|
"putrakuningan/auth-module": "^1.0"
|
|
|
|
```
|
|
|
|
Now you can run composer update to install the package.
|
|
|
|
|
|
|
|
|
|
|
|
Or you can install with :
|
|
|
|
```
|
|
|
|
composer require putrakuningan/auth-module:1.0.0
|
|
|
|
```
|
|
|
|
After add repositories
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Setup Module
|
|
|
|
To activate the module type:
|
|
|
|
|
|
|
|
```
|
|
|
|
php artisan module:enable Auth
|
|
|
|
```
|
|
|
|
|
|
|
|
Now the module is ready to be migrated and seeded:
|
|
|
|
```
|
2023-05-28 02:26:08 +00:00
|
|
|
php artisan module:migrate Auth
|
2023-05-27 16:25:19 +00:00
|
|
|
php artisan module:seed Auth
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2023-05-27 16:25:44 +00:00
|
|
|
## Uninstall Packages
|
2023-05-27 16:25:19 +00:00
|
|
|
If you uninstall a package from composer.json the module WILL be removed from the modules directory.
|
|
|
|
|