PHPackages                             utkarshgayguwal/laravel-smart-scaffold - 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. utkarshgayguwal/laravel-smart-scaffold

ActiveLibrary[Admin Panels](/categories/admin)

utkarshgayguwal/laravel-smart-scaffold
======================================

Generate complete Laravel CRUD operations with a single command, including models, controllers with actual code having error handling, migrations, requests, factories, resources, and routes - ready for immediate API testing in Postman

v1.5.0(12mo ago)059MITPHPPHP ^8.0

Since May 5Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/utkarshgayguwal/laravel-smart-scaffold)[ Packagist](https://packagist.org/packages/utkarshgayguwal/laravel-smart-scaffold)[ Docs](https://github.com/utkarshgayguwal/laravel-smart-scaffold)[ RSS](/packages/utkarshgayguwal-laravel-smart-scaffold/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (11)Used By (0)

Laravel Smart Scaffold
======================

[](#laravel-smart-scaffold)

[![Latest Version](https://camo.githubusercontent.com/5b9253b2a0295e14311f50adc39320838fa60322d9537ea70b1afd2f65206845/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f75746b61727368676179677577616c2f6c61726176656c2d736d6172742d73636166666f6c643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/utkarshgayguwal/laravel-smart-scaffold)[![License](https://camo.githubusercontent.com/8095f43e4b9c960ab84a37fc47ee42d0e0eebf74c1af38d711e3890447cec25c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f75746b61727368676179677577616c2f6c61726176656c2d736d6172742d73636166666f6c643f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/be65ba48be54bc2543642a338191308c4dd0cfb12116cbbdbfa5f9fb8b6ee482/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f75746b61727368676179677577616c2f6c61726176656c2d736d6172742d73636166666f6c643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/utkarshgayguwal/laravel-smart-scaffold)[![PHP Version](https://camo.githubusercontent.com/05471f2723d6e925cfd613c04e82c375449fac42216aa88802ff1b77c31e5cdf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f75746b61727368676179677577616c2f6c61726176656c2d736d6172742d73636166666f6c643f7374796c653d666c61742d737175617265)](https://packagist.org/packages/utkarshgayguwal/laravel-smart-scaffold)

🚀 Generate complete Laravel CRUD operations with a single command! Smart Scaffold automatically creates all necessary components including models, controllers, migrations, requests, factories, resources, filters, and routes - ready for immediate API testing.

---

🚀 Why Choose Smart Scaffold?
----------------------------

[](#-why-choose-smart-scaffold)

- ⚡ **Instant Development** - Get your API endpoints working in minutes
- 🛡 **Production-Ready Code** - Built-in error handling and validation
- 🎯 **Complete API Stack** - Everything you need for RESTful APIs
- 🤖 **Smart Generation** - Automatic relationships and field detection
- 🔍 **Built-in Filtering** - Auto-generated filter classes for all models
- 📦 **API Resources** - Clean JSON response formatting

---

✨ Key Features
--------------

[](#-key-features)

### 📦 Complete CRUD Stack

[](#-complete-crud-stack)

- **Models** with `HasFactory`, `SoftDeletes` and filtering support
- **Controllers** with full CRUD methods and error handling
- **Migrations** with smart field type detection
- **Factories** with intelligent Faker data generation
- **Requests** with strict validation (all fields required)
- **Resources** for standardized API responses (ID-first format)
- **Filters** for advanced query filtering
- **Routes** automatically added to `routes/api.php`

### 🔥 Advanced Features

[](#-advanced-features)

- **Smart Relationships** - Automatic foreign key detection
- **Type-Aware Filtering** - Different logic per field type
- **Standardized Responses** - Consistent JSON API format
- **Field Modifiers** - nullable, default, unique, index, cascade
- **Postman Integration** - Ready-to-use API endpoints

---

### 🛠️ Field Types &amp; Modifiers

[](#️-field-types--modifiers)

TypeDescriptionExample`string`VARCHAR`name:string``text`TEXT`content:text``integer`INT`quantity:integer``decimal`DECIMAL`price:decimal:precision(8,2)``boolean`TINYINT(1)`is_active:boolean``foreign`Creates relationship`user_id:foreign:users:id`ModifierExampleResult`nullable``bio:text:nullable``$table->text('bio')->nullable()``default(value)``status:string:default(draft)``$table->string('status')->default('draft')``unique``email:string:unique``$table->string('email')->unique()``index``slug:string:index``$table->string('slug')->index()``cascade``user_id:foreign:cascade`Adds `->onDelete('cascade')`---

🛠 Installation
--------------

[](#-installation)

```
# Install via Composer
composer require utkarshgayguwal/laravel-smart-scaffold

# Run the publish command (optional)
php artisan vendor:publish --provider="UtkarshGayguwal\SmartScaffold\Providers\SmartScaffoldServiceProvider"
```

---

💻 Usage Examples
----------------

[](#-usage-examples)

### Basic CRUD Generation

[](#basic-crud-generation)

```
# Generate a Category model with name and description
php artisan make:crud Category --fields='name:string,description:text';
```

### Advanced Field Types

[](#advanced-field-types)

```
# Generate with various field types and modifiers
php artisan make:crud Product \
  --fields="
    name:string:required:max:255,
    description:text:nullable,
    price:decimal:default(0),
    stock:integer:default(0),
    category_id:foreign:categories:id:cascade
  "
```

🚀 Quick Start
-------------

[](#-quick-start)

1. Install the package:

```
composer require utkarshgayguwal/laravel-smart-scaffold
```

2. Generate a CRUD:

```
php artisan make:crud User --fields="email:string:unique,password:string"
```

3. Test in Postman:

- GET `/api/products` - List all users
- POST `/api/products` - Create a new user
- GET `/api/products/{id}` - View a user
- POST `/api/products/{id}?_method=PUT` - Update a user
- DELETE `/api/products/{id}` - Delete a user

---

📝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a new Pull Request

---

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance50

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

6

Last Release

364d ago

### Community

Maintainers

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

---

Top Contributors

[![utkarshgayguwal](https://avatars.githubusercontent.com/u/95024380?v=4)](https://github.com/utkarshgayguwal "utkarshgayguwal (60 commits)")

---

Tags

laravelscaffoldinggeneratormodelcrudcontroller

### Embed Badge

![Health badge](/badges/utkarshgayguwal-laravel-smart-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/utkarshgayguwal-laravel-smart-scaffold/health.svg)](https://phpackages.com/packages/utkarshgayguwal-laravel-smart-scaffold)
```

###  Alternatives

[crestapps/laravel-code-generator

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.

76591.7k1](/packages/crestapps-laravel-code-generator)

PHPackages © 2026

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