mtech / module-helper
Utilities for M-Tech API Projects that using laravel module pattern
1.1.0
2026-05-07 02:09 UTC
Requires
- php: ^8.2
- laravel/framework: ^12.0|^13.0
- nwidart/laravel-modules: ^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^11.5|^12.0
README
Create Template for Migration, Model, Contract, and Repository in Modules with one command
Compatibility
- PHP
^8.2(includes PHP 8.4 when using Laravel 13) - Laravel Framework
^12.0|^13.0 nwidart/laravel-modules^12.0|^13.0
Installation
composer require mtech/module-helper --dev
How to use
php artisan mtech:make-model {module} {table} {model} --meta
php artisan mtech:make-attachment {module} {table} {model}
Example:
-
Model:
php artisan mtech:make-model Voyage voyage_details VoyageDetail -
Meta: Please note that to create metas, include the option
--metain the command:php artisan mtech:make-model Voyage voyage_types VoyageType --meta- Attachment: Please note that third variable is the Model that this attachment belongs to. In this example, we want to create voyage attachment, so the third variable should be Voyage:
php artisan mtech:make-attachment Voyage voyage_attachments Voyage
Important Notes
You still need to bind contract and repository in the Config/config.php