PHPackages                             hitocean/crud-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hitocean/crud-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hitocean/crud-generator
=======================

This is my package crud-generator

1.0.3(1y ago)014.8k↓31%[2 PRs](https://github.com/vadiun-dev/crud-generator/pulls)MITPHPPHP ^8.1

Since Apr 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vadiun-dev/crud-generator)[ Packagist](https://packagist.org/packages/hitocean/crud-generator)[ Docs](https://github.com/vadiun-dev/crud-generator)[ GitHub Sponsors](https://github.com/Hitocean)[ RSS](/packages/hitocean-crud-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (10)Versions (8)Used By (0)

This is my package crud-generator
=================================

[](#this-is-my-package-crud-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f57ee520bd5c46e6245ca0dae10a05c4087fa0a9d98a601ff3a85ad1338c0abb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6869746f6365616e2f637275642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vadiun-dev/crud-generator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/386077776e798f355147037d050f992030410b0373914e96fbbb8465c021b42b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f76616469756e2d6465762f637275642d67656e657261746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/vadiun-dev/crud-generator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ef204f90a77b9ad331441a553ac86a85a82bde8e043c7d3346637189fd21d829/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f76616469756e2d6465762f637275642d67656e657261746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/vadiun-dev/crud-generator/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a41ba4f5cfc142bba012321f87c7cbb6eef5a059e9bfb540d5ed4264c67beab1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6869746f6365616e2f637275642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vadiun-dev/crud-generator)

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

[](#installation)

You can install the package via composer:

```
composer require hitocean/crud-generator
```

Usage
-----

[](#usage)

### Configuracion de modelo

[](#configuracion-de-modelo)

```
php artisan make:hit-model-config
```

Este comando permite generar un archivo de configuracion para la generacion de un modelo. Este archivo va a estar situado en la carpeta ***generators/models***.

El archivo generado se puede ver asi.

```
{
    "modelName": "Company",
    "root_folder": "src/Domain/Company/Models",
    "root_namespace": "Src\\Domain\\Company\\Models",
    "tableName": "companies",
    "crud": true,
    "attributes": [
        {
            "name": "name",
            "type": "string"
        },
        {
            "name": "email",
            "type": "string"
        },
        {
            "name": "address",
            "type": "?string"
        }
    ]
}
```

En este archivo se pueden modificar todos los valores que se deseen antes de generar los archivos para el modelo.

### Crear Modelo

[](#crear-modelo)

```
php artisan make:hit-model
```

Este comando permite generar un modelo con los atributos y relaciones que se definieron en el archivo de configuracion. Va a generar los siguientes archivos:

- Modelo
- Factory
- Migracion

**Es importante destacar que al correr el comando se van a tratar de crear todos los archivos dentro de generators/models. Por lo que si un modelo ya esta creado lo va a intentar reemplazar.**

### Configuracion de controlador

[](#configuracion-de-controlador)

```
php artisan make:hit-controller-config
```

Al igual que para con los modelos, este comando crea un archivo de configuracion con el que luego se creara el controlador. Este archivo se crea en la carpeta ***generators/controllers***.

***Consideraciones***

- Es necesario que el modelo sobre el cual se va a generar el controlador ya este creado y migrado.
- Al ejecutar el comando nos va a solicitar que elijamos que metodos de un crud queremos generar, para marcarlos hay que tocar la barra espaciadora.

El archivo generado se puede ver asi:

```
{
    "controller_name": "CompanyController",
    "root_folder": "src/Application/Company/Controllers",
    "root_namespace": "Src\\Application\\Company\\Controllers",
    "model_import": "Src\\Domain\\Company\\Models\\Company",
    "test_path": "tests/Application/Company/Controllers/CompanyControllerTest",
    "methods": [
        {
            "name": "index",
            "route_method": "get",
            "data_class_import": null,
            "data_class_path": null,
            "resource_class_import": "Src\\Application\\Company\\Resources\\IndexCompanyResource",
            "resource_class_path": "src/Application/Company/Resources/IndexCompanyResource",
            "inputs": [],
            "outputs": [
                {
                    "name": "id",
                    "type": "int"
                },
                {
                    "name": "name",
                    "type": "string"
                },
                {
                    "name": "email",
                    "type": "string"
                },
                {
                    "name": "address",
                    "type": "string"
                },
                {
                    "name": "created_at",
                    "type": "date"
                },
                {
                    "name": "updated_at",
                    "type": "date"
                }
            ]
        },
        {
            "name": "store",
            "route_method": "post",
            "data_class_import": "Src\\Application\\Company\\Data\\StoreCompanyData",
            "data_class_path": "src/Application/Company/Data/StoreCompanyData",
            "resource_class_import": null,
            "resource_class_path": null,
            "inputs": [
                {
                    "name": "id",
                    "type": "int"
                },
                {
                    "name": "name",
                    "type": "string"
                },
                {
                    "name": "email",
                    "type": "string"
                },
                {
                    "name": "address",
                    "type": "string"
                },
                {
                    "name": "created_at",
                    "type": "date"
                },
                {
                    "name": "updated_at",
                    "type": "date"
                }
            ],
            "outputs": []
        },
        {
            "name": "update",
            "route_method": "put",
            "data_class_import": "Src\\Application\\Company\\Data\\UpdateCompanyData",
            "data_class_path": "src/Application/Company/Data/UpdateCompanyData",
            "resource_class_import": null,
            "resource_class_path": null,
            "inputs": [
                {
                    "name": "id",
                    "type": "int"
                },
                {
                    "name": "name",
                    "type": "string"
                },
                {
                    "name": "email",
                    "type": "string"
                },
                {
                    "name": "address",
                    "type": "string"
                },
                {
                    "name": "created_at",
                    "type": "date"
                },
                {
                    "name": "updated_at",
                    "type": "date"
                }
            ],
            "outputs": []
        },
        {
            "name": "destroy",
            "route_method": "delete",
            "data_class_import": null,
            "data_class_path": null,
            "resource_class_import": null,
            "resource_class_path": null,
            "inputs": [],
            "outputs": []
        },
        {
            "name": "show",
            "route_method": "get",
            "data_class_import": null,
            "data_class_path": null,
            "resource_class_import": "Src\\Application\\Company\\Resources\\ShowCompanyResource",
            "resource_class_path": "src/Application/Company/Resources/ShowCompanyResource",
            "inputs": [],
            "outputs": [
                {
                    "name": "id",
                    "type": "int"
                },
                {
                    "name": "name",
                    "type": "string"
                },
                {
                    "name": "email",
                    "type": "string"
                },
                {
                    "name": "address",
                    "type": "string"
                },
                {
                    "name": "created_at",
                    "type": "date"
                },
                {
                    "name": "updated_at",
                    "type": "date"
                }
            ]
        }
    ]
}
```

### Crear controlador

[](#crear-controlador)

```
php artisan make:hit-controller
```

***IMPORTANTE:*** Se van a crear todos los controladores que esten dentro de la carpeta ***generators/controllers***. En caso de que ya existan los va a sobreescribir.

Al ejecutar este comando se van a crear los siguientes archivos:

- Controller.
- Data.
- Resource.
- Test.

**Consideraciones**

- Es necesario registrar la ruta donde corresponda, el paquete no lo hace automaticamente.
- Al UpdateData que se genera no tiene en cuenta que viene un route parameter hay que agregarselo manualmente. EJ: #\[FromRouteParameter('company')\]
- las relaciones en los controladores no estan contempladas aun.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [joaquin3684](https://github.com/vadiun-dev)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.3% 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 ~0 days

Total

4

Last Release

694d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab9845133b09302afc0939a57a3c7fa73613f0deae4455d44bd2f857c5f0e9cc?d=identicon)[hitocean](/maintainers/hitocean)

---

Top Contributors

[![joaquin3684](https://avatars.githubusercontent.com/u/12788242?v=4)](https://github.com/joaquin3684 "joaquin3684 (41 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelcrud generatorhitocean

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hitocean-crud-generator/health.svg)

```
[![Health](https://phpackages.com/badges/hitocean-crud-generator/health.svg)](https://phpackages.com/packages/hitocean-crud-generator)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[nativephp/desktop

NativePHP for Desktop

34020.6k3](/packages/nativephp-desktop)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)

PHPackages © 2026

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