|
| 1 | +# Module management package for Laravel |
| 2 | + |
| 3 | +[](https://github.com/akaunting/module/releases) |
| 4 | + |
| 5 | + |
| 6 | +[](https://styleci.io/repos/180799968) |
| 7 | +[](https://scrutinizer-ci.com/g/akaunting/module) |
| 8 | +[](LICENSE.md) |
| 9 | + |
| 10 | +This package intends to make your Laravel app extendible via modules. A module is kinda small Laravel app, shipping with its own views, controllers, models etc. |
| 11 | + |
| 12 | +## Getting Started |
| 13 | + |
| 14 | +### 1. Install |
| 15 | + |
| 16 | +Run the following command: |
| 17 | + |
| 18 | +```bash |
| 19 | +composer require akaunting/module |
| 20 | +``` |
| 21 | + |
| 22 | +### 2. Register |
| 23 | + |
| 24 | +Service provider and facade will be registered automatically. If you want to register them manually in `config/app.php`: |
| 25 | + |
| 26 | +```php |
| 27 | +Akaunting\Module\Facade::class, |
| 28 | +Akaunting\Module\Providers\Laravel::class, |
| 29 | +``` |
| 30 | + |
| 31 | +### 3. Publish |
| 32 | + |
| 33 | +Publish config file. |
| 34 | + |
| 35 | +```bash |
| 36 | +php artisan vendor:publish --tag=module |
| 37 | +``` |
| 38 | + |
| 39 | +### 4. Configure |
| 40 | + |
| 41 | +You can change the configuration from `config/module.php` file |
| 42 | + |
| 43 | +### 5. Autoloading |
| 44 | + |
| 45 | +By default, the module classes are not loaded automatically. You can autoload your modules using `psr-4`. For example: |
| 46 | + |
| 47 | +``` json |
| 48 | +{ |
| 49 | + "autoload": { |
| 50 | + "psr-4": { |
| 51 | + "App\\": "app/", |
| 52 | + "Modules\\": "modules/" |
| 53 | + } |
| 54 | + } |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +**Tip: don't forget to run `composer dump-autoload` afterwards.** |
| 59 | + |
| 60 | +## Usage |
| 61 | + |
| 62 | +Check out the [wiki](../../wiki) about the usage and further documentation. |
| 63 | + |
| 64 | +## Changelog |
| 65 | + |
| 66 | +Please see [Releases](../../releases) for more information what has changed recently. |
| 67 | + |
| 68 | +## Contributing |
| 69 | + |
| 70 | +Please see [CONTRIBUTING](CONTRIBUTING.md) for details. |
| 71 | + |
| 72 | +## Credits |
| 73 | + |
| 74 | +- [Denis Duliçi](https://github.com/denisdulici) |
| 75 | +- [Nicolas Widart](https://github.com/nwidart) |
| 76 | +- [All Contributors](../../contributors) |
| 77 | + |
| 78 | +## License |
| 79 | + |
| 80 | +The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information. |
0 commit comments