PHPackages                             prajwalgiri/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. [Admin Panels](/categories/admin)
4. /
5. prajwalgiri/crud-generator

ActiveLibrary[Admin Panels](/categories/admin)

prajwalgiri/crud-generator
==========================

Laravel CRUD generator for Laravel 12+, with web and API scaffolding.

v1.5.0(4mo ago)010MITPHPPHP ^8.2

Since Jan 21Pushed 4mo agoCompare

[ Source](https://github.com/prajwalgiri02/crud-generator)[ Packagist](https://packagist.org/packages/prajwalgiri/crud-generator)[ RSS](/packages/prajwalgiri-crud-generator/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (13)Used By (0)

🚀 Laravel Instant CRUD Generator
================================

[](#-laravel-instant-crud-generator)

A powerful Laravel package to instantly scaffold complete CRUD modules (Model, Migration, Controller, Requests, Resources, Views, and Routes) using a single Artisan command.

Designed for developers who want to avoid boilerplate while maintaining full control through clean inheritance and lifecycle hooks.

---

✨ Features
----------

[](#-features)

- **Blazing Fast**: Generate a full module in seconds.
- **Full Scaffolding**: Generates Model, Migration, Controller, Store/Update Requests, API Resources, and Blade Views.
- **Smart Separation**: Automatically generates appropriate logic for both Web (Blade views) and API (JSON) interfaces.
- **Thin Controllers**: Generated controllers are lightweight and easy to maintain.
- **API Resources**: Automatic data transformation for API responses.
- **Modern UI**: Blade views generated with Tailwind CSS (Breeze compatible).
- **Lifecycle Hooks**: Easy customization via `beforeCreate`, `afterCreate`, `beforeUpdate`, and `afterUpdate`.
- **Customizable Pagination**: Configure pagination limits per controller.
- **Advanced Features**: Built-in support for Search and Soft Deletes.

---

🔧 Installation
--------------

[](#-installation)

Install the package via composer:

```
composer require prajwalgiri/crud-generator
```

The package will automatically register itself using Laravel's package discovery.

---

⚙️ Usage (The CLI)
------------------

[](#️-usage-the-cli)

The core command is `php artisan crud:generate`.

### 1. Simple Web CRUD

[](#1-simple-web-crud)

```
php artisan crud:generate Post --fields="title:string,content:text,is_published:boolean"
```

### 2. API CRUD (with Resources)

[](#2-api-crud-with-resources)

```
php artisan crud:generate Post --fields="title:string,content:text" --api
```

### 3. Advanced Options

[](#3-advanced-options)

- `--soft-deletes`: Adds soft delete support to Model, Migration, and Controller.
- `--search`: Adds a search bar and logic to your index page (Web).
- `--force`: Overwrites existing files.

---

🏗️ Field Definition Syntax
--------------------------

[](#️-field-definition-syntax)

Define your schema directly in the command: `--fields="name:type:option1:option2"`

FeatureSyntaxResult**Basic**`title:string``$table->string('title')` + Text Input**Large Text**`content:text``$table->text('content')` + Textarea**Nullable**`bio:string:nullable`Allows empty values in DB &amp; Validation**Unique**`email:string:unique`Adds unique constraint**Boolean**`active:boolean`Checkbox in UI + Boolean in DB**Dates**`published_at:date`Date picker in UI---

🎮 Controller Customization
--------------------------

[](#-controller-customization)

Generated controllers allow for easy customization without overriding core logic:

### Customization Properties

[](#customization-properties)

You can define these properties in your generated controllers:

```
protected int $perPage = 15; // Custom pagination
protected ?string $redirectRoute = 'admin.dashboard'; // Custom redirect (Web)
protected string $createMessage = 'Successfully created!'; // Custom messages (Web)
```

### ⚓ Lifecycle Hooks

[](#-lifecycle-hooks)

Use hooks in your generated controller to add custom logic:

```
protected function beforeCreate(array $data, Request $request)
{
    $data['user_id'] = auth()->id();
    return $data; // Must return the data array
}

protected function afterCreate($model, $request)
{
    // Send notification, log activity, etc.
}
```

---

📄 License
---------

[](#-license)

MIT License. Built with ❤️ by Prajwal Giri.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance73

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Total

12

Last Release

149d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/117528397?v=4)[prajwalgiri02](/maintainers/prajwalgiri02)[@prajwalgiri02](https://github.com/prajwalgiri02)

---

Top Contributors

[![prajwalgiri02](https://avatars.githubusercontent.com/u/117528397?v=4)](https://github.com/prajwalgiri02 "prajwalgiri02 (13 commits)")

---

Tags

laravelgeneratorscaffoldcrud

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)

PHPackages © 2026

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