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

On this page you can find all versions of the php package efati/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 Laravel package to generate fully structured modules (Model, Repository, Service, Interface, DTO, Controller, Form Requests, and Tests) with a single Artisan command.

Features


Installation


Configuration

Publish the configuration file:

This will create config/module-generator.php where you can adjust:

Customising generator stubs

If your team follows specific coding standards you can publish and edit the generator stubs:

All stub files will be copied to resources/stubs/module-generator. The generators always look for a published stub first, so any changes you make there (naming conventions, imports, method bodies, docblocks, etc.) will be reflected in the next generation run. The package uses simple placeholders such as {{ namespace }}, {{ class }} or {{ store_argument }} inside the stub files—leave these intact and only change the surrounding structure to keep the dynamic parts working.


Usage

Create a module

Options (long form)

Option Description
--api Generate an API-flavoured controller (default path: Http/Controllers/Api/V1)
--controller=Subdir Place controller inside a subdirectory (forces controller generation)
--requests Generate Form Requests for Store/Update
--tests Force CRUD Feature Test generation
--no-controller Skip controller generation
--no-resource Skip API Resource generation
--no-dto Skip DTO generation
--no-test Skip Feature Test generation
--no-provider Skip provider creation and auto-registration
--from-migration= Provide a migration path or keyword to infer fields when the model class does not exist yet
--force Overwrite existing files (default is to skip and warn)
--fields= Inline schema definition so generators can infer fillable fields, validation rules, and test payloads before the Eloquent model exists

Short aliases

Alias Long option
-a --api
-c --controller
-r --requests
-t --tests
-nc --no-controller
-nr --no-resource
-nd --no-dto
-nt --no-test
-np --no-provider
-fm --from-migration
-f --force

Example

This will generate:

Tip: rerunning the generator without --force will skip existing files and list the skipped paths in the console output.

New in v4: you can prime the generator with a migration when the Eloquent model class is not ready yet:

The command will scan the migration, infer columns, nullable/unique flags, and foreign keys, then feed that metadata to the DTO, FormRequest, Resource, and Feature Test generators.


Test Generation

When using --tests, the package will:


Goli Date Helper

The package now ships with an in-house Jalali toolkit exposed via the goli() helper and the Goli class, so you can drop the third-party Verta dependency and reuse the converter anywhere in your project.

Key capabilities include:

Carbon Jalali Macros

When the service provider boots it registers two Carbon macros, giving you an instant bridge between Carbon and Goli:

The toJalali() macro returns a Goli instance, so you keep access to all Jalali helpers (digit localisation, formatting helpers, etc.). fromJalali() gives you a regular Carbon instance back for further chaining. Both macros accept an optional timezone argument and are only registered once, so you can safely call the service provider multiple times (or invoke ModuleGeneratorServiceProvider::registerCarbonMacros() manually in a console script).

Looking for a quick smoke test? Run php tests/CarbonMacrosExample.php to execute the same round-trip conversion showcased above.


Version History

v5.3

v5.2

v5.1

v5.0


License

MIT


پینوشت: با تشکر از gole davoodi 😆


All versions of laravel-module-generator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version >=10.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 efati/laravel-module-generator contains the following files

Loading the files please wait ....