azcore/azmodule

Module generator of AZCore

1.0.2 2024-11-18 13:53 UTC

This package is auto-updated.

Last update: 2025-06-18 15:06:41 UTC


README

AZModule is a Laravel package designed to streamline the process of generating new modules in your application based on a YAML (.yml) file. This tool allows you to define your module's database structure, forms, and API endpoints with a simple configuration file. The package is fully integrated with Laravel Breeze, Livewire, Spatie Laravel-Permission, and TALLStackUI, offering a complete solution for rapid module development.

Features

Installation

Install package:

composer require azcore/azmodule

Example Configuration

Create a directory on your root project called modules and create a file .yml. Here's an example of how to define a file called category.yml:

name: Category

migrations:
  -
    table: categories
    fields:
      id: integer
      name: string
      active: boolean|default:true
      timestamp: true
      soft_deletes: true

index:
  search:
    name: like
  columns:
    name: Nome
    active: Ativo
    actions: Ações|sortable:false

form:
  fields:
    name: Nome|input|required
    active: Ativo|toggle|default:true

api:
  label: name
  value: id

Usage

After creating your YAML configuration file, you can generate the module using the following Artisan command:

php artisan az:module category

This command will scaffold all the necessary files and configurations for the "Category" module, including migrations, views, controllers, and API resources.