Download the PHP package batinmustu/laravel-module-maker without Composer

On this page you can find all versions of the php package batinmustu/laravel-module-maker. 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-maker

Laravel Module Maker

Latest Version on Packagist Total Downloads

This project appears to be a Laravel package named laravel-module-maker developed by batinmustu. The package is designed to facilitate the creation of modules in a Laravel application. It provides a command-line interface for generating module stubs based on predefined templates.

The package includes a set of predefined templates (stubs) for common module structures, such as 'category'. Users can select which stubs to generate, and the package will create the necessary files and directories based on the selected template. The stubs can be customized by the user, and the package provides a command for publishing the stub templates for customization.

The package is installed via Composer and its configuration can be published using php artisan module-maker:publish command. The configuration includes the path to the stub templates folder.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Optionally, you can publish the stub templates using

Core Stub Templates

The Laravel Module Maker package comes with a set of predefined templates (stubs) to help you generate modules quickly. Here are the core stub templates provided by the package:

Template Name Template Key Stubs
Category category Go to folder

Generate a New Module

To generate a new module using the Laravel Module Maker package, you can use the module-maker command provided by the package. Here's a step-by-step guide

  1. Open your terminal and navigate to your Laravel project directory.
  2. Run the module-maker command followed by the name of the module you want to create. The module name should be in StudlyCase (e.g., BlogCategory). You can also specify the template you want to use with the --template option. For example, if you want to use the 'category' template, you can do so like this:

  3. The command will then ask you to select the stubs you want to generate. You can select multiple stubs by using space and clicking on the stubs you want to generate.
  4. If the --accept-risk option is not set, the command will warn you about the potential risks of overwriting existing files that use the same path as the template stubs. You can choose to proceed or cancel the operation.
  5. Once you confirm, the command will generate the module based on the selected template and stubs.

Note: Remember, you can customize the stub templates by publishing them to your Laravel project and modifying them in the resources/stubs/modules directory.

Customize The Stub Templates in The Laravel Module Maker

To customize the stub templates in the Laravel Module Maker package, you can follow these steps:

  1. Publish the stub templates: The package provides a command to publish the stub templates. This will copy the stub templates from the package to your Laravel project. You can run this command in your terminal:

  2. Locate the stub templates: After publishing, the stub templates will be located in the resources/stubs/modules directory of your Laravel project, as specified in the laravel-module-maker.php configuration file.
  3. Customize the stub templates: You can now customize the stub templates in this directory. You can modify the existing stubs or create new ones based on your requirements.

Stub Template Parameters

The stub templates in the Laravel Module Maker package support parameters that can be replaced with actual values when generating the module. You can use these parameters in the stub files to dynamically generate content based on the module name and other inputs.

Here are the available parameters that you can use in the stub templates:

You can use these parameters in your stub files to generate dynamic content and file / folder name based on the module name and other inputs.

What is The Blueprint File Used For?

The blueprint file, module-blueprint.yml, is a file that contains the structure of the module you want to generate. You can provide the module name, template, and stubs you want to generate in this file. The Laravel Module Maker package uses this file to generate the module based on the specified structure.

Here's an example of a module-blueprint.yml file:

In this example, we have two modules, BlogCategory and NewsCategory. Both modules use the category template to generate the module structure. However, we exclude the __Module__Controller.php.stub stub file from the BlogCategory module.

You can create a module-blueprint.yml file in the root directory of your Laravel project and specify the modules you want to generate along with the template and stubs you want to exclude.

You can then run the module-maker:blueprint command to generate the modules based on the blueprint file:

Credits

License

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


All versions of laravel-module-maker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^10.0||^11.0
laravel/prompts Version ^0.1.17
spatie/laravel-package-tools Version ^1.16
symfony/yaml Version ^v6.4.3.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 batinmustu/laravel-module-maker contains the following files

Loading the files please wait ....