> For the complete documentation index, see [llms.txt](https://mybizna.gitbook.io/mybizna-erp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mybizna.gitbook.io/mybizna-erp/modules.md).

# Modules

Mybizna modules are developed using the Laravel-modules package.

Laravel-modules is a popular package for Laravel that provides a modular architecture for creating web applications. It allows developers to create self-contained modules in Laravel. This package is developed and maintained by Nicolas Widart.

One benefit of using Laravel-modules is reusable code that can be installed or uninstalled without affecting the system . This makes it easy to manage and update each module separately.

Mybizna Module works with the following file structure by minimum.

<pre><code>
Modules/
  ├── Account/    
      ├── Classes/
         ├── Invoice.php    
         ├── Ledger.php                      
      ├── Entities/
          ├── Data/
              ├── Ledger.php          
              ├── Invoice.php          // Preset Data for ERP
          ├── Ledger.php              
<strong>          ├── Invoice.php              // Entity 
</strong>      ├── Events/
         ├── InvoicePaid.php     
      ├── Http/
         ├── Controllers/     
              ├── InvoiceController.php 
      ├── Listeners/
         ├── CoreSettingModified.php 
      ├── Providers/
         ├── EventServiceProvider.php    
      ├── Resources/  
         ├──views/  
              ├──payment.blade.php                                             
         ├──vue/
              ├── admin/
                  ├── invoice/
                      ├── form.vue
                      ├── search.vue
                      ├── list.vue
      ├── Routes/
         ├── api.php   
         ├── web.php          
      ├── Tests/
      ├── composer.json
      ├── menus.json
      ├── module.json
      ├── README.json
      ├── right.php    
<strong>      ├── settings.php   
</strong><strong>      ├── widgets.php        
</strong></code></pre>

It seems like you're listing the files and directories in your Laravel project named MyBizna. Here's a breakdown of what each of these typically represents in a Laravel project:

1. **Classes**: This directory likely contains your custom PHP classes. In Laravel, these could include controllers, models, middleware, services, and other PHP classes that you've created for your application.
2. **Events**: This directory might contain event classes. In Laravel, events are used to trigger actions or behavior in response to certain activities within your application.
3. **menus.php**: This file could potentially contain configuration or data related to menus in your application. It might define the structure of your application's navigation menus.
4. **README.md**: This is a Markdown file that typically serves as the entry point for your project's documentation. It provides an overview of the project, installation instructions, usage examples, and other important information.
5. **Routes**: This directory contains route definitions for your application. In Laravel, routes define the URL endpoints and map them to controller actions or closures.
6. **widgets.php**: This file might define configuration or data related to widgets in your application. It could specify the settings or properties of various widgets used in your application's user interface.
7. **composer.json**: This file is the Composer configuration file for your project. It specifies the dependencies of your project and other metadata required by Composer, the PHP dependency manager.
8. **Http**: This directory contains classes related to HTTP requests and responses, such as controllers, middleware, and form requests.
9. **module.json**: This file could be a configuration file specific to a module within your Laravel application. It might define metadata, dependencies, or other settings related to the module.
10. **Resources**: This directory typically contains non-PHP resources used by your application, such as views, assets (CSS, JavaScript), language files, and other static files.
11. **settings.php**: This file might contain configuration settings for your application. It could define application-level settings, environment-specific configurations, or other global settings.
12. **Entities**: This directory might contain entity classes, often used in the context of object-relational mapping (ORM) libraries like Eloquent in Laravel. Entities represent database tables or documents and encapsulate their behaviour and data.
13. **Listeners**: This directory could contain event listener classes. In Laravel, event listeners are responsible for handling events and executing logic in response to those events.
14. **Providers**: This directory contains service provider classes. Service providers are used to register bindings, event listeners, middleware, and other services with the Laravel service container.
15. **right.php**: This file could contain configuration or data related to user permissions or access rights in your application. It might specify roles, permissions, or access control rules.
16. **Tests**: This directory typically contains automated tests for your application, including unit tests, feature tests, and integration tests.

Note Entites is auto-migrated using the command or after the composer version is changed to a new version.

```
php artisan automigrator:migrate
```

Other module functions can be added as illustrated in <https://nwidart.com/laravel-modules/v6/introduction>
