wr2net/lm-create

To create the suggested structures, the execution options are shown below. To create a "Project", it will be created within the default "app" directory with the name of your project where all the modules will be located.To create the modules or the complete skeleton of the module, you must also info

Installs: 94

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/wr2net/lm-create


README

Laravel Module Create

Laravel Module Create

LM-CREATE

Packagist Downloads GitHub Release GitHub License PHP Version Laravel Version Laravel Version Laravel Version

🚀 Laravel Module Create is a complete module create for Laravel.

To create the suggested structures, the execution options are shown below. To create a "Project", it will be created within the default "app" directory with the name of your project where all the modules will be located.

To create the modules or the complete skeleton of the module, you must also inform your project, as shown in each command.

After executing the skeleton creation, the Providers for registration will be displayed.

Remember that Laravel 10 and 11 have different places for declaring Providers.

This library create structure below

└── MyProject 
    ├── Commons
        └── Traits
            ├── RouteServiceProviderTrait.php
            └── SoftDeletes.php
    └── MyModules
        ├── Controllers
            └── Api
                └── MyModuleController.php
        ├── Models
            ├── MyModule.php
            └── Repositories
                ├── MyModuleRepositoryInterface.php
                └── MyModuleRepository.php
        ├── Providers
            ├── AppServiceProvider.php
            └── RouteServiceProvider.php
        ├── Requests
            └── MyModuleRequest.php
        ├── Resources
            ├── MyModuleCollection.php
            └── MyModuleResource.php
        ├── Routes
            ├── api.php
            └── web.php
        └── Services
            └── MyModuleService.php

� Installation

Install the package via Composer:

composer require --dev wr2net/lm-create

📚 Commands

To create a project:

php artisan lm-create:project MyProject

To create a module:

php artisan lm-create:module MyProject MyModule

To create a scaffold:

php artisan lm-create:skeleton MyProject MyModule

To create a basic scaffold:

php artisan lm-create:basic MyProject MyModule

This command creates the basic structure below

└── MyProject 
    ├── Commons
        └── Traits
            └── SoftDeletes.php
    └── MyModules
        ├── Models
            ├── MyModule.php
            └── Repositories
                ├── MyModuleRepositoryInterface.php
                └── MyModuleRepository.php
        ├── Providers
            └── AppServiceProvider.php
        └── Services
            └── MyModuleService.php

If you need compound names, use quotes

This is valid for Projects, Modules and Skeleton

Eg. Project:

php artisan lm-create:project 'My Project'

Eg. Module or Skeleton:

php artisan lm-create:module 'My Project' 'My Module'
php artisan lm-create:skeleton 'My Project' 'My Module'

📄 License

The MIT License (MIT). Please see License File for more information.

📝 TO DO List

Resource Description Category
[v] Run in production Not is running by artisan FEAT
[V] Basic Skeleton Create basic skeleton to usage model FEAT
[ ] Generate Migrations Generate a command to create a migration for the created module and output it along with the information for logging. FEAT
[ ] Generate Unit Tests Generate a basic structure for unit testing the module. FEAT
[ ] Generate Integration Tests Generate a basic structure for integration testing the module. FEAT

FIX BUGS

Resource Description Category
[v] No replace If module was created but, not is complete, in new generate cannot replace if exists resources BUG
[v] Namespace Modules with compound names are not generating namespaces correctly BUG

🔧 For Developers

composer install

Commands:

php src/Config/lm-create-dev.php -f project:MyProject
php src/Config/lm-create-dev.php -f module:MyProject:MyModule
php src/Config/lm-create-dev.php -f skeleton:MyProject:MyModule
php src/Config/lm-create-dev.php -f basic:MyProject:MyModule