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

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 Postman collection generation and DB diagram export for streamlined API development and documentation.


โœจ Features


๐Ÿš€ Installation

Install the package via Composer:

๐Ÿ“ฆ Service Provider

Generate required files and configurations:

๐Ÿ“‚ Optional: Publish Config & Stubs

You may publish the configuration and stub files to customize them. If you don't publish them, the package will use its built-in defaults automatically.

This will publish:


๐Ÿ› ๏ธ Usage

1. Create Your YAML Configuration

Create a YAML file at the default path: module/models.yaml

Define your models with their fields, validation rules, and relationships:

Example: module/models.yaml

2. Generate Your Complete Module

Generate the complete module structure with all features:

Available Options:

3. Generate Individual Components

You can also generate specific components separately:

Generate Postman Collection Only

Generate DB Diagram Only

Backup Existing Files While Generating


๐Ÿงช What Gets Generated

For each model defined in your YAML file, the package will generate:

Core Laravel Components

๐Ÿ†• Documentation & Testing


๐Ÿ“‹ Postman Collection Features

The generated Postman collection includes:

Sample generated endpoints:

๐Ÿ—„๏ธ Database Diagram Features

The generated DB diagram (.dbml) includes:

Usage with dbdiagram.io:

  1. Copy the content from module/dbdiagram.dbml
  2. Visit dbdiagram.io
  3. Paste the content to visualize your database schema
  4. Export as needed (PNG, PDF, SQL)

๐Ÿงฑ Stub Customization

This package allows you to override any of the stubs it uses for complete customization of generated code.

Default Stub Configuration

Customizing Stubs

If you published the stubs with:

You can edit them at: module/stub/

Each stub file uses placeholders that get replaced during generation, allowing you to maintain consistency across your entire codebase.


โš™๏ธ Configuration

To change the YAML path or customize stub names, update config/module-generator.php:


๐Ÿ“ YAML Schema Guide

Field Types

Relationship Types

Unique Constraints

Define composite unique constraints:

Selective Generation

Control what gets generated for each model:


๐Ÿš€ Complete Workflow Example

Here's a complete workflow from YAML to production-ready API:


๐Ÿ”„ Versioning

This package follows Semantic Versioning. Use tags like v1.0.0, v1.1.0, etc., when pushing updates to Packagist.


๐Ÿค Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.


๐Ÿ™ Credits

Created and maintained by Nahid Ferdous

Special thanks to the Laravel community and all contributors who help improve this package.


๐Ÿ› Issues & Support

If you encounter any issues or have questions:

  1. Check the existing issues
  2. Create a new issue with detailed information
  3. Include your YAML configuration and error messages

๐Ÿš€ Roadmap


๐Ÿ“ˆ Recent Updates

v1.0.10


Happy coding! ๐ŸŽ‰


All versions of laravel-module-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/support Version ^10.0|^11.0|^12.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 ....