Download the PHP package ngodingskuyy/laravel-module-generator without Composer

On this page you can find all versions of the php package ngodingskuyy/laravel-module-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-module-generator

Laravel Module Generator v4.2

๐Ÿš€ Laravel 12+ Focused Module Generator

Tests

Modular CRUD Generator for Laravel + Vue + Tailwind (shadcn-vue) - Optimized for Laravel 12+ with PHP 8.2+

Version 4.2 is a complete refactor focused exclusively on Laravel 12+ with comprehensive testing, improved code generation, and modern best practices.


๐Ÿ“‹ Requirements

๐Ÿ“ฆ Installation

Quick Installation

โš ๏ธ If You Encounter Version Conflicts

Due to older versions on Packagist, you might need to install from source:

For detailed troubleshooting, see DEVELOPMENT.md


๐Ÿš€ Features

โœจ What's New in v4.2

๏ฟฝ Core Features


๏ฟฝ Requirements

๏ฟฝ๐Ÿ“ฆ Installation

For local development/testing:

Then:


๐Ÿ”ง Usage

Basic Usage

With Optional Components

Force Overwrite Existing Files

๐Ÿ—‘๏ธ Deleting Features

Delete Basic Feature

Delete with Optional Components

Delete All Components (including optional)

Force Delete (no confirmation)

What Gets Deleted

The delete:feature command will remove:

โš ๏ธ Warning: This action is irreversible. Make sure to backup your files or use version control.

๐Ÿ”— Auto-Loading Module Routes

Setup Modules Auto-Loader

Install and Integrate Auto-Loader

Manual Integration

Add this line to your routes/web.php or routes/app.php (Laravel 11+):

How It Works

The modules auto-loader automatically discovers and loads all web.php files from subdirectories in routes/Modules/:

Benefits:

Generated Files Structure

Running php artisan make:feature User will generate:


๐Ÿ“š API Documentation

Commands Overview

The Laravel Module Generator provides four main commands for complete feature lifecycle management:

Command Description Purpose
make:feature Generate complete CRUD feature Create new features
delete:feature Remove complete CRUD feature Clean up features
setup:modules-loader Create modular route loader Setup route automation
install:modules-loader Install route loader into Laravel Integrate with Laravel routing

๐Ÿ“ make:feature Command

Signature: make:feature {name} {--with=*} {--force}

Description

Generates a complete CRUD feature with all necessary files including models, controllers, views, migrations, routes, and permissions.

Arguments

Argument Type Required Description
name string Yes The name of the feature to generate (PascalCase)

Options

Option Type Default Description
--with array [] Optional components to include
--force flag false Overwrite existing files without confirmation

Optional Components (--with)

Component Description Generated Files
factory Model factory for testing database/factories/{Name}Factory.php
policy Authorization policy app/Policies/{Name}Policy.php
observer Model observer app/Observers/{Name}Observer.php
enum Status enum class app/Enums/{Name}StatusEnum.php
test Feature test class tests/Feature/{Name}Test.php

Generated Files (Core)

Usage Examples

Return Codes

Code Meaning
0 Success - All files generated successfully
1 Error - Missing required arguments or validation failed
2 Error - File already exists and --force not specified

๐Ÿ—‘๏ธ delete:feature Command

Signature: delete:feature {name} {--with=*} {--all} {--force}

Description

Safely removes all files associated with a feature, including optional components and empty directories.

Arguments

Argument Type Required Description
name string Yes The name of the feature to delete (PascalCase)

Options

Option Type Default Description
--with array [] Optional components to delete
--all flag false Delete all components (core + optional)
--force flag false Delete without confirmation prompt

Deletion Scope

Core Files (always deleted):

Optional Files (with --with or --all):

Directory Cleanup:

Usage Examples

Interactive Confirmation

When --force is not used, the command shows:

  1. List of files to be deleted
  2. Confirmation prompt
  3. Deletion progress with status for each file

Return Codes

Code Meaning
0 Success - All specified files deleted
1 Error - Feature not found or validation failed
2 Cancelled - User declined confirmation

๐Ÿ”„ setup:modules-loader Command

Signature: setup:modules-loader {--force}

Description

Creates the modular route loader file that automatically discovers and loads route files from the routes/modules/ directory.

Options

Option Type Default Description
--force flag false Overwrite existing modules.php file

Generated Files

Features

Usage Examples

Generated Code Structure

The generated routes/modules.php contains:


โš™๏ธ install:modules-loader Command

Signature: install:modules-loader {--force}

Description

Integrates the modules loader into Laravel's main routing system by adding the include statement to routes/web.php.

Options

Option Type Default Description
--force flag false Add include even if already exists

Modifications

File Modified: routes/web.php

Added Code:

Usage Examples

Integration Process

  1. Checks if routes/modules.php exists
  2. Scans routes/web.php for existing installation
  3. Adds include statement if not present
  4. Provides status feedback

๐Ÿ—๏ธ Module Directory Structure

After setting up the modular loader system:

Route File Example

routes/modules/products.php:


๐Ÿ”ง Advanced Configuration

Custom Stub Files

You can publish and customize the stub templates:

Stub File Locations

Environment Considerations

Development:

Production:


๐Ÿงช Testing Integration

Generated Test Files

When using --with=test, generates:

Running Tests


๐Ÿšจ Error Handling

Common Issues & Solutions

File Already Exists:

Permission Denied:

Stub File Missing:

Route Not Loading:

Debug Commands


๐Ÿงช Comprehensive Testing (New in v4.2)

๐ŸŽฏ Test Suite Overview

Version 4.2 includes a comprehensive test suite with 37 tests and 164 assertions achieving 100% pass rate:

Unit Tests

Feature Tests

Integration Tests

๐Ÿš€ GitHub Actions CI/CD

Automated testing pipeline with comprehensive validation:

Pipeline Features:

๐Ÿƒโ€โ™‚๏ธ Local Testing

Run Complete Test Suite

Test Coverage

๐Ÿ” Test Validation

The test suite validates:

  1. Stub File Integrity: All stubs exist and contain required placeholders
  2. Code Generation: Generated files have correct syntax and structure
  3. Command Options: --force and --with options work correctly
  4. Vue Components: All Vue files have proper template structure
  5. Database Integration: Migrations and seeders are properly generated
  6. Permission System: Spatie Laravel Permission integration works
  7. Package Registration: Service provider loads correctly in Laravel

Run with Coverage

Testing in Real Laravel App

CI Pipeline Status

The workflow tests:

  1. Package Validation - Syntax, dependencies, composer.json
  2. Laravel Integration - Install package in fresh Laravel 11
  3. Command Execution - Run make:feature and verify file creation
  4. Laravel Compatibility - Ensure no conflicts with Laravel core

๐Ÿ”„ Migration from v3.x to v4.2

โš ๏ธ Breaking Changes

Version 4.2 includes breaking changes focused on Laravel 12+ support:

  1. PHP Version: Minimum PHP 8.2 required
  2. Laravel Version: Only Laravel 12+ supported
  3. Dependencies: Updated to latest versions

๐Ÿ“ Migration Steps

  1. Update PHP Version

  2. Update Laravel Version

  3. Update Package

  4. Update Spatie Permission

  5. Clear and Rebuild

๐Ÿท๏ธ Legacy Support


๐Ÿค Contributing

We welcome contributions! Please feel free to submit a Pull Request.

Development Setup

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/yourusername/laravel-module-generator
  3. Install dependencies: composer install
  4. Run tests: ./vendor/bin/phpunit
  5. Make your changes and test thoroughly
  6. Submit a pull request

๐Ÿ“‹ Contribution Guidelines

๏ฟฝ๐Ÿ“„ License

MIT ยฉ 2025 NgodingSkuyy


Laravel Module Generator v4.2 - Focused on Laravel 12+, Enhanced with Comprehensive Testing, Built for Modern PHP Development


All versions of laravel-module-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0
spatie/laravel-permission Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ngodingskuyy/laravel-module-generator contains the following files

Loading the files please wait ....