PHPackages                             alirezappeto/entity-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. alirezappeto/entity-generator

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

alirezappeto/entity-generator
=============================

A Laravel package to generate entity files

v1.0.5(7mo ago)038MITPHPPHP &gt;=8.0

Since Jun 7Pushed 7mo agoCompare

[ Source](https://github.com/alirezacoinpay/entity-generator)[ Packagist](https://packagist.org/packages/alirezappeto/entity-generator)[ RSS](/packages/alirezappeto-entity-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Laravel Entity Generator
========================

[](#laravel-entity-generator)

A developer-friendly Laravel package to instantly generate fully-structured entities — including **Model, Controller, Repository (with Interface &amp; Cache), Resource, Request, and Migration** — all based on a clean **Repository Pattern**. Built-in support for tagged caching makes it perfect for scalable Laravel APIs.

---

⚙️ Features
-----------

[](#️-features)

- ✅ One command to generate an entire entity stack
- ✅ Repository pattern structure with interface segregation
- ✅ Optional CacheRepository included for performance
- ✅ Generates:
    - Model (`extends BaseModel`)
    - Controller (API-ready)
    - Requests (Add, Update, All)
    - API Resource
    - Repositories: Interface + Eloquent + Cache
    - Migration
- ✅ Auto-binds interface to CacheRepository in your `RepositoryServiceProvider`
- ✅ Stub-driven — customize everything

---

🚀 Installation
--------------

[](#-installation)

```
    composer require alirezappeto/entity-generator
```

#### after installation the package you have to initialize the package utils

[](#after-installation-the-package-you-have-to-initialize-the-package-utils)

```
    php artisan entity-generator:install
```

This will generate:

- app/Models/BaseModel.php
- app/Repository/BaseRepository.php
- app/Repository/BaseCacheRepository.php
- app/Repository/BaseRepositoryInterface.php
- and ...

---

Generate an entity
------------------

[](#generate-an-entity)

```
   php artisan make:entity Product
```

#### this command will generate for you these files

[](#this-command-will-generate-for-you-these-files)

- app/Models/Product.php
- app/Http/Controllers/ProductController.php
- app/Http/Resources/ProductResource.php
- app/Http/Requests/Products/AddProductRequest.php
- app/Repositories/Product/ProductRepositoryInterface.php
- app/Repositories/Product/ProductRepository.php
- app/Repositories/Product/ProductCacheRepository.php
- database/migrations/xxxx\_xx\_xx\_create\_products\_table.php

---

🧱 Repository Pattern
--------------------

[](#-repository-pattern)

This package uses a clean layered architecture:

- Controller
- → Request Validation
- → Repository Interface
- → Cache Repository
- → Base Repository (Eloquent)

---

⚠️ Cache Notes
--------------

[](#️-cache-notes)

Ensure your cache driver supports tags:

- ✅ CACHE\_DRIVER=redis

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance62

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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 ~22 days

Recently: every ~28 days

Total

6

Last Release

232d ago

### Community

Maintainers

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

---

Top Contributors

[![alirezacoinpay](https://avatars.githubusercontent.com/u/188972087?v=4)](https://github.com/alirezacoinpay "alirezacoinpay (8 commits)")

### Embed Badge

![Health badge](/badges/alirezappeto-entity-generator/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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