PHPackages                             sobhan-aali/laravel-repo-controller-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. sobhan-aali/laravel-repo-controller-generator

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

sobhan-aali/laravel-repo-controller-generator
=============================================

Generate controller, repository and request files.

v1.2.2(10mo ago)649MITPHP

Since Jun 17Pushed 4mo agoCompare

[ Source](https://github.com/LotousOrganization/laravel-repo-controller-generator)[ Packagist](https://packagist.org/packages/sobhan-aali/laravel-repo-controller-generator)[ RSS](/packages/sobhan-aali-laravel-repo-controller-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

[![Laravel Repo Controller Generator](image.png)](image.png)

🚀 Laravel Repo Controller Generator
===================================

[](#-laravel-repo-controller-generator)

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, resources, and collections — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

🚀 Laravel Repo Controller Generator
===================================

[](#-laravel-repo-controller-generator-1)

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction-1)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

📦 Features
----------

[](#-features)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start)

### 1. Publish Stub Files

[](#1-publish-stub-files)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The names# 🚀 Laravel Repo Controller Generator

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction-2)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

📦 Features
----------

[](#-features-1)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation-1)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-1)

### 1. Publish Stub Files

[](#1-publish-stub-files-1)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-1)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-1)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The names# 🚀 Laravel Repo Controller Generator

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction-3)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

📦 Features
----------

[](#-features-2)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation-2)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-2)

### 1. Publish Stub Files

[](#1-publish-stub-files-2)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-2)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-2)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```# 🚀 Laravel Repo Controller Generator

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

## 👋 Introduction

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

## 📦 Features

- ✅ Generate **CRUD Controllers**

- ✅ Automatically create **Repositories**

- ✅ Generate **Form Requests** for `store` and `update`

- ✅ Create **API Resources** (both admin and public versions)

- ✅ Clean file structure based on namespace conventions

---

## ⚙️ Installation

Install the package via Composer:

```bash
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-3)

### 1. Publish Stub Files

[](#1-publish-stub-files-3)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-3)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-3)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast.

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-1)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-1)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-1)

🚀 Laravel Repo Controller Generator
===================================

[](#-laravel-repo-controller-generator-2)

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction-4)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

📦 Features
----------

[](#-features-3)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation-3)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-4)

### 1. Publish Stub Files

[](#1-publish-stub-files-4)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-4)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-4)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-2)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-2)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-2)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-1)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-1)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast.

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-2)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-2)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast. pace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-3)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-3)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-3)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-3)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-3)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast. pace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-4)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-4)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-4)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-4)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-4)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast.

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command.
It promotes clean architecture by separating concerns using repositories, request validation, resource transformation, and unified collection handling.

---

📦 Features
----------

[](#-features-4)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ **Resource Traits** to share common fields between `Admin` and `Public` resources (DRY-friendly)
- ✅ **Collections** t# 🚀 Laravel Repo Controller Generator

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

👋 Introduction
--------------

[](#-introduction-5)

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

📦 Features
----------

[](#-features-5)

- ✅ Generate **CRUD Controllers**
- ✅ Automatically create **Repositories**
- ✅ Generate **Form Requests** for `store` and `update`
- ✅ Create **API Resources** (both admin and public versions)
- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation-4)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-5)

### 1. Publish Stub Files

[](#1-publish-stub-files-5)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-5)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-5)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-5)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-5)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-5)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-5)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-5)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast. o unify and standardize API responses for `index` and `paginate` endpoints

- ✅ Clean file structure based on namespace conventions

---

⚙️ Installation
---------------

[](#️-installation-5)

Install the package via Composer:

```
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-6)

### 1. Publish Stub Files

[](#1-publish-stub-files-6)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-6)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

---

🚀 Usage
-------

[](#-usage-6)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-6)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-6)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

می‌خوای بخش ￼￼ApiResponse::success￼￼ رو بذارم به صورت یک ￼￼helper مستقل￼￼ هم توضیح بدم (مثلاً success / error / validation) یا فقط توی Collection کفایت می‌کنه؟### 🎯 Resources &amp; Traits

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`
- `app/Http/Resources/Post/PostResourceTrait.php` → shared fields between resources

### 📚 Collections

[](#-collections)

- `app/Http/Resources/Post/PostCollection.php`

    > Ensures consistent response format for lists and paginated results.

### 🧠 Repository

[](#-repository-6)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-6)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

---

🔑 Key Benefits of New Features
------------------------------

[](#-key-benefits-of-new-features)

### Resource Traits

[](#resource-traits)

- Common fields like `id`, `title`, `created_at` are stored in the **trait**.
- Both `Admin` and `Public` resources extend the trait and only merge their specific fields.
- Keeps your resources DRY and easy to maintain.

### Collections

[](#collections)

- Standardizes API responses for `index` and `paginate`.
- Ensures all collections follow a consistent format across your project.
- Works seamlessly with Laravel's `ResourceCollection`.

#### 🔧 Usage Example

[](#-usage-example)

You can wrap your collections with the built-in response helper for **consistent API outputs**:

```
use SobhanAali\LaravelRepoControllerGenerator\Support\ApiResponse;
use App\Http\Resources\Post\AdminPostResource;
use App\Http\Resources\Post\PostCollection;

public function index()# 🚀 Laravel Repo Controller Generator

**A lightweight Laravel package to generate full-featured CRUD controllers, repositories, form requests, and resources — all in one shot.**

---

## 👋 Introduction

Hi, I'm **Sobhan Aali** — thanks for checking out this package!

`laravel-repo-controller-generator` is designed to **speed up your Laravel development workflow** by generating a full CRUD setup with just one Artisan command. It promotes clean architecture by separating concerns using repositories, request validation, and resource transformation.

---

## 📦 Features

- ✅ Generate **CRUD Controllers**

- ✅ Automatically create **Repositories**

- ✅ Generate **Form Requests** for `store` and `update`

- ✅ Create **API Resources** (both admin and public versions)

- ✅ Clean file structure based on namespace conventions

---

## ⚙️ Installation

Install the package via Composer:

```bash
composer require sobhan-aali/laravel-repo-controller-generator:dev-master
```

---

🧱 Before You Start
------------------

[](#-before-you-start-7)

### 1. Publish Stub Files

[](#1-publish-stub-files-7)

The package uses stub templates to generate your classes. Run this command to publish them for customization:

```
php artisan vendor:publish --tag=repo-controller-stubs
```

### 2. Use the `GetFillables` Trait

[](#2-use-the-getfillables-trait-7)

Make sure your base model uses the `GetFillables` trait for automatic field generation:

```
use SobhanAali\LaravelRepoControllerGenerator\Traits\GetFillables;

class BaseModel extends Model
{
    use GetFillables;
}
```

> You can extend your Eloquent models from this base class for consistency.

---

🚀 Usage
-------

[](#-usage-7)

Run the following command to generate a complete CRUD setup:

```
php artisan make:repo-controller Api/V1/Admin/CRUD/PostController
```

> ⚠️ **Note**: The namespace must begin with `Api/V` followed by your desired version (e.g., `V1`).

---

🗂️ What Gets Generated?
-----------------------

[](#️-what-gets-generated-7)

Running the command above will generate the following files for the `Post` model:

### 🧾 Form Requests

[](#-form-requests-7)

- `app/Http/Requests/Admin/CRUD/Post/StorePostRequest.php`
- `app/Http/Requests/Admin/CRUD/Post/UpdatePostRequest.php`

### 🎯 Resources

[](#-resources-6)

- `app/Http/Resources/Post/PostResource.php`
- `app/Http/Resources/Post/AdminPostResource.php`

### 🧠 Repository

[](#-repository-7)

- `app/Repositories/Eloquent/PostRepository.php`

### 🎮 Controller

[](#-controller-7)

- `app/Http/Controllers/Api/V1/Admin/CRUD/PostController.php`

All files are tightly connected and follow Laravel's best practices. With minimal adjustments, you can plug them directly into your application and get started fast.

{ $posts = Post::paginate();

```
return ApiResponse::success(
    new PostCollection(
        $posts,        // First param → the collection (e.g., posts)
        'post',        // Second param → singular name for response keys
        AdminPostResource::class // Third param → the resource type
    )
);

```

}

```

#### ✅ Example Response

```json
{
  "success": true,
  "data": {
    "posts": [
      {
        "id": 1,
        "title": "First Post",
        "created_at": "2025-08-26"
      },
      {
        "id": 2,
        "title": "Second Post",
        "created_at": "2025-08-26"
      }
    ],
    "meta": {
      "total": 50,
      "per_page": 15,
      "current_page": 1,
      "last_page": 4
    }
  }
}

```

---

👉 With these features, you’ll get **faster development**, **cleaner code**, and **consistent API responses** across your Laravel app.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance65

Regular maintenance activity

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Total

5

Last Release

317d ago

### Community

Maintainers

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

---

Top Contributors

[![Sobhanaali](https://avatars.githubusercontent.com/u/95542970?v=4)](https://github.com/Sobhanaali "Sobhanaali (47 commits)")

### Embed Badge

![Health badge](/badges/sobhan-aali-laravel-repo-controller-generator/health.svg)

```
[![Health](https://phpackages.com/badges/sobhan-aali-laravel-repo-controller-generator/health.svg)](https://phpackages.com/packages/sobhan-aali-laravel-repo-controller-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)
