Download the PHP package nahid-ferdous/laravel-module-generator without Composer

On this page you can find all versions of the php package nahid-ferdous/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

📖 Introduction

A developer-friendly Laravel package to generate complete modules (Model, Migration, Controller, Service, Resource, Collection, Form Request, and Routes) from a single YAML configuration file. Now includes Authentication (Sanctum & Passport) & User Management, Postman collection generation, and DB diagram export for streamlined API development and documentation.

✨ Features

🚀 Installation

Install the package via Composer:

Setup

Generate required files and configurations:

Or force install if you've already executed the command:

What Gets Generated

Optional: Publish Config & Stubs

Customize the package defaults by publishing configuration and stubs:

This creates:

🔐 Authentication & User Management

Prerequisites: Configure your .env DB connection before generating the authentication module.

Generate Auth System

Create a complete authentication system with a single command:

Available Options:

What Gets Generated

Authentication Files:

User Management Files:

Roles & Permissions (optional):

Social Authentication (optional):

API Endpoints

Authentication:

User Management:

Roles & Permissions:

Social Authentication:

Setup Instructions

1. Choose Authentication Guard (Sanctum or Passport)

Sanctum (Recommended for Single-Page Apps):

Update bootstrap/app.php:

Passport (For Third-Party Clients):

2. Update User Model

For Sanctum:

For Passport:

For Roles & Permissions:

3. Update Configuration Files

.env:

config/auth.php:

4. Register Routes

Update routes/api.php:

5. Configure Social Providers (Optional)

Update config/services.php:

6. Seed Initial Data

database/seeders/DatabaseSeeder.php:

Run:

🛠️ Module Generation from YAML

Quick Start

Generate a complete module set (Model, Migration, Controller, Service, Resource, Collection, Form Request, Routes) from a single YAML file.

Default YAML location: module/models.yaml

Use custom file:

YAML Configuration Guide

Minimal Example

Complete Example

Generation Commands

Main Command: module:generate

Generate complete API modules from YAML schema.

Signature:

Examples:

Database Diagram: dbdiagram:generate

Export your YAML schema as DBML for visualization.

Signature:

Examples:

Use dbdiagram.io to visualize and export diagrams.

Postman Collection: postman:generate

Generate a Postman collection for API testing.

Signature:

Examples:

DBML to YAML: dbdiagram:import

Convert existing DBML files to YAML format.

Signature:

Workflow:

  1. Design schema at dbdiagram.io
  2. Export DBML
  3. Save to .dbml file
  4. Run import command
  5. Review and use generated YAML

Rollback: module:rollback

Restore to a previous generation state using automatic backups.

Signature:

Examples:

YAML Field Types & Modifiers

Supported Types:

Common Modifiers:

Field Examples:

Relationships

Format: relationType: Model:functionName, Model:functionName

Supported Types:

Examples:

Special Mapping:

Generation Control

Control Options:

Valid Components: model, migration, controller, service, request, resource, collection, seeder

Compound Unique Constraints:

Output Locations

Troubleshooting

Auth Module Conflicts: If you ran auth:generate previously, set User.generate_only: seeder in YAML to avoid overwriting custom auth code.

Migration Issues: Use new migrations to alter existing tables rather than editing previously-applied migrations.

Foreign Key Naming: Ensure foreignId:table values match your actual table names.

File Uploads: Models with image or file fields automatically generate form-data Postman requests.

Version Control: Keep your YAML schema in Git and use branches before running --force to make rollbacks easier.

🚀 Complete Workflow

From installation to production-ready API:

1. Generate Authentication (Optional)

2. Create YAML Schema

Create or edit module/models.yaml with your models and fields.

3. Review Generated Files

Review output before running --force.

4. Apply Migrations

5. Test with Postman

Import module/postman_collection.json into Postman and test endpoints.

6. Visualize Database

Copy DBML output to dbdiagram.io for visualization.

7. Local Testing

8. Deploy

Commit changes and deploy:



Following this workflow will help you safely move from YAML schemas to fully-functional API endpoints.

✨ Features Summary

🚀 Roadmap

📝 Recent Updates

v1.3.00

v1.2.50

v1.2.0

v1.0.10

Happy generating! 🎉


All versions of laravel-module-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
illuminate/support Version ^13.0
symfony/yaml Version ^6.0 || ^7.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 nahid-ferdous/laravel-module-generator contains the following files

Loading the files please wait ...