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(9mo ago)040MITPHPPHP &gt;=8.0

Since Jun 7Pushed 9mo 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 69% of packages

Maintenance58

Moderate activity, may be stable

Popularity9

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

278d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/188972087?v=4)[alireza roostaei](/maintainers/alirezacoinpay)[@alirezacoinpay](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M280](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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