PHPackages                             omnifyjp/laravel-scaffold - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. omnifyjp/laravel-scaffold

ActiveLibrary[Framework](/categories/framework)

omnifyjp/laravel-scaffold
=========================

A powerful Laravel package that automates the generation of Models, Controllers, Migrations, and other essential components from database schemas.

2.2.9(10mo ago)0370proprietaryPHP

Since Apr 18Pushed 6mo agoCompare

[ Source](https://github.com/omnifyjp/laravel-scaffold)[ Packagist](https://packagist.org/packages/omnifyjp/laravel-scaffold)[ RSS](/packages/omnifyjp-laravel-scaffold/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (10)Versions (26)Used By (0)

Laravel Scaffold
================

[](#laravel-scaffold)

A powerful Laravel package that automates the generation of Models, Controllers, Migrations, and other essential components from database schemas.

Installation
------------

[](#installation)

```
composer require omnifyjp/laravel-scaffold
```

YAML Configuration Attributes Guide
===================================

[](#yaml-configuration-attributes-guide)

General Structure of YAML Files

YAML configuration files are used to define objects (models) and the relationships between them in the system. Each file represents an object or model in the system.

High-Level Attributes
---------------------

[](#high-level-attributes)

### `kind`

[](#kind)

- **Role**: Defines the type of configuration.
- **Common value**: `object` (data object).

### `displayName`

[](#displayname)

- **Role**: The name shown in the user interface.
- **Usage**: Displayed on forms, tables, and lists.

### `groupName`

[](#groupname)

- **Role**: Groups related objects together in the system.
- **Common values**: `System`, `Line`, or the name of a module in the system.

### `titleIndex`

[](#titleindex)

- **Role**: Specifies which field is used as the title when displaying a list.
- **Example**: If `titleIndex: name`, when displaying a list, the value of the `name` field will be used as the title.

### `options`

[](#options)

- **Role**: Global configuration for the object.
- **Main options**:
    - `timestamps`: When `true`, automatically creates and manages `created_at` and `updated_at` fields.
    - `softDelete`: When `true`, records are not physically deleted but only marked as deleted.
    - `private`: Controls the privacy of the object.
    - `sortable`: Allows sorting of records.
    - `authenticatable`: Indicates if the object can be used for authentication.
    - `unique`: Defines unique constraints (single or composite fields).
    - `indexes`: List of fields to be indexed to optimize queries.
    - `polymorphic`: Allows polymorphic relationships (one object can be linked to many different types of objects).
    - `nestedSet`: Used for hierarchical tree structures.

### `properties`

[](#properties)

- **Role**: Defines all data fields of the object.
- **Structure**: Each child property is a data field with its own configurations.

Data Field Attributes
---------------------

[](#data-field-attributes)

### `type`

[](#type)

- **Role**: Defines the data type of the field.
- **Basic types**:
    - `String`: Regular text string.
    - `Int`: Integer.
    - `BigInt`: Large integer.
    - `Boolean`: True/false value.
    - `Date`: Date (without time).
    - `Timestamp`: Date and detailed time.
    - `Time`: Time only.
    - `Text`: Long text.
    - `Json`: JSON-formatted data.
    - `Color`: Color value.
- **Special types**:
    - `Email`: Email address.
    - `JapanPhone`: Phone number in Japanese format.
    - `JapanAddress`: Japanese address.
    - `JapanPersonName`: Japanese person's name.
    - `Password`: Password (automatically encrypted).
    - `File`: Single file.
    - `MultiFile`: Multiple files.
    - `Enum`: Fixed list of values.
    - `Select`: Reference to a global selection list.
    - `Association`: Relationship between objects.
    - `Polymorphic`: Polymorphic relationship.
    - `Lookup`: Search and reference.

### `displayName`

[](#displayname-1)

- **Role**: The display name of the field in the user interface.
- **Usage**: Shown on forms, tables, lists.

### `nullable`

[](#nullable)

- **Role**: Allows the field to have a null value or not.
- **Values**: `true` or `false`.
- **Default**: `false` if not specified.

### `default`

[](#default)

- **Role**: Sets the default value when creating a new record.
- **Value type**: Depends on the data type of the field.

### `index`

[](#index)

- **Role**: Creates an index to optimize search/query on this field.
- **Values**: `true` or `false`.
- **Effect**: Improves performance when searching by this field.

### `unique`

[](#unique)

- **Role**: Ensures the value of the field is unique in the data table.
- **Values**: `true` or `false`.

### `private`

[](#private)

- **Role**: Controls the privacy of the data field.
- **Values**: `true` or `false`.
- **Effect**: When `true`, the value is not publicly displayed and is protected.

### `editable`

[](#editable)

- **Role**: Determines whether the field can be edited or not.
- **Values**: `true` or `false`.
- **Default**: `true` if not specified.

### `rules`

[](#rules)

- **Role**: Defines data validation rules for the field.
- **Common rules**:
    - `required`: Required input.
    - `minLength`: Minimum length.
    - `maxLength`: Maximum length.

### `accept`

[](#accept)

- **Role**: Applied to fields of type `File` or `MultiFile`, specifies the accepted file types.
- **Value**: List of file extensions separated by commas (e.g., `.jpg,.jpeg,.png`).

Attributes for Special Data Types
---------------------------------

[](#attributes-for-special-data-types)

### Attributes for `Enum` type

[](#attributes-for-enum-type)

#### `enum`

[](#enum)

- **Role**: Defines the list of fixed values for `Enum` type fields.
- **Structure**: Array of objects with properties:
    - `value`: Value stored in the database.
    - `label`: Label displayed in the user interface.

### Attributes for `Select` type

[](#attributes-for-select-type)

#### `select`

[](#select)

- **Role**: References a globally defined selection list.
- **Syntax**: `Global::DefinitionName` (e.g., `Global::Gender`).

Relationship Attributes Between Objects
---------------------------------------

[](#relationship-attributes-between-objects)

### Attributes for `Association` type

[](#attributes-for-association-type)

#### `relation`

[](#relation)

- **Role**: Defines the type of relationship between objects.
- **Relationship types**:
    - `ManyToOne`: Many-to-one (e.g., many patients belong to one pharmacy).
    - `ManyToMany`: Many-to-many (e.g., a user has many roles, a role applies to many users).
    - `OneToMany`: One-to-many (e.g., one post has many comments).
    - `OneToOne`: One-to-one (e.g., one user has one profile).

#### `target`

[](#target)

- **Role**: Specifies the target object of the relationship.
- **Value**: Name of the target object (e.g., `Pharmacy`, `User`).

#### `inversedBy`

[](#inversedby)

- **Role**: Specifies the name of the property in the target object that points back to the current object.
- **Meaning**: Establishes a bidirectional relationship, allowing access from the target object back to the current object.
- **Example**: If `Patient` has a relationship with `Pharmacy` through the `pharmacy` field and `inversedBy: patients`, then in `Pharmacy` there will be a `patients` field pointing back to all related `Patient` records.

#### `mappedBy`

[](#mappedby)

- **Role**: In a bidirectional relationship, specifies which object is the owner of the relationship.
- **Usage**: Specifies the non-owning side in a bidirectional relationship.
- **Example**: In a relationship between `Pharmacy` and `Notice`, if `Pharmacy` declares `mappedBy: notices`, then the `Notice` object is the owner of the relationship.

### Attributes for `Polymorphic` type

[](#attributes-for-polymorphic-type)

#### `relation`

[](#relation-1)

- **Role**: Same as in `Association`, defines the type of relationship.

#### `target`

[](#target-1)

- **Role**: Specifies the target object of the polymorphic relationship.
- **Characteristic**: The target object must have the option `polymorphic: true`.

#### `inversedBy`

[](#inversedby-1)

- **Role**: Similar to `Association`, but applied to polymorphic relationships.

Self-created Example: Product Management
----------------------------------------

[](#self-created-example-product-management)

```
kind: object

displayName: Product

groupName: Inventory

titleIndex: product_name

options:
  timestamps: true
  softDelete: true
  sortable: true
  indexes:
    - product_code
    - category_id_relation_field
    - status

properties:
  product_code:
    type: String
    displayName: Product Code
    unique: true
    index: true
    rules:
      required: true
      maxLength: 50

  product_name:
    type: String
    displayName: Product Name
    rules:
      required: true
      maxLength: 255

  description:
    type: Text
    displayName: Description
    nullable: true

  price:
    type: Decimal
    displayName: Selling Price
    rules:
      required: true

  cost:
    type: Decimal
    displayName: Cost Price
    nullable: true
    private: true

  status:
    type: Enum
    displayName: Status
    enum:
      - value: active
        label: Active
      - value: out_of_stock
        label: Out of Stock
      - value: discontinued
        label: Discontinued
    default: active
    index: true

  stock_quantity:
    type: Int
    displayName: Stock Quantity
    default: 0

  images:
    type: MultiFile
    accept: .jpg,.jpeg,.png
    displayName: Product Images
    nullable: true

  specifications:
    type: Json
    displayName: Technical Specifications
    nullable: true

  category:
    type: Association
    relation: ManyToOne
    target: ProductCategory
    inversedBy: products
    displayName: Category
    nullable: true

  tags:
    type: Association
    relation: ManyToMany
    target: Tag
    inversedBy: products
    displayName: Tags

  supplier:
    type: Association
    relation: ManyToOne
    target: Supplier
    inversedBy: products
    displayName: Supplier
    nullable: true

  promotion:
    type: Association
    relation: ManyToMany
    target: Promotion
    inversedBy: products
    displayName: Promotions

  reviews:
    type: Association
    relation: OneToMany
    target: ProductReview
    inversedBy: product
    displayName: Reviews

  featured:
    type: Boolean
    displayName: Featured Product
    default: false

  launch_date:
    type: Date
    displayName: Launch Date
    nullable: true

  last_restock_at:
    type: Timestamp
    displayName: Last Restock Time
    nullable: true
    editable: false
```

Above is an example of a YAML configuration for a Product object in an inventory management system, demonstrating the use of the attributes explained. The object has various relationships with other objects such as Category, Supplier, Promotion, and Review.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance60

Regular maintenance activity

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

25

Last Release

326d ago

Major Versions

1.0.10 → 2.0.02025-07-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26842626?v=4)[Pham Thai Duong](/maintainers/ecsol)[@ecsol](https://github.com/ecsol)

---

Top Contributors

[![ecsol](https://avatars.githubusercontent.com/u/26842626?v=4)](https://github.com/ecsol "ecsol (68 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/omnifyjp-laravel-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/omnifyjp-laravel-scaffold/health.svg)](https://phpackages.com/packages/omnifyjp-laravel-scaffold)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.3k2.2k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.4k169.0k9](/packages/bagisto-bagisto)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
