mtech/module-helper

Utilities for M-Tech API Projects that using laravel module pattern

Maintainers

Package info

github.com/ELXA-DEVELOPER/module-helper

Homepage

pkg:composer/mtech/module-helper

Statistics

Installs: 2 777

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2026-05-07 02:09 UTC

This package is auto-updated.

Last update: 2026-05-07 02:57:18 UTC


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 --meta in 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