PHPackages                             mr.incognito/crudify - 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. [Database &amp; ORM](/categories/database)
4. /
5. mr.incognito/crudify

ActiveLaravel-package[Database &amp; ORM](/categories/database)

mr.incognito/crudify
====================

This package is for handling the crud for simple crud like for setup etc.

v2.0.4(10mo ago)1219MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Jul 10Pushed 10mo agoCompare

[ Source](https://github.com/SandeepX/laravel-crud-package)[ Packagist](https://packagist.org/packages/mr.incognito/crudify)[ RSS](/packages/mrincognito-crudify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (9)Used By (0)

Laravel CRUD Generator
======================

[](#laravel-crud-generator)

A Laravel package to quickly scaffold **API or Web-based CRUD operations** using a simple Artisan command. It generates **Models**, **Migrations**, **Form Requests**, **API Resources**, **Controllers**, and even **Blade views** — with full support for validation, foreign keys, nullable fields, and default values.

Installation
------------

[](#installation)

To install the package, run:

```
composer require mr.incognito/crudify
```

---

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

[](#-features)

- ✅ Generates **Model**, **Migration**, **Controller**, **Request**, and **Resource**
- ✅ Supports Web (with Blade views) or API type generation
- ✅ Handles **nullable** fields (using `~` as a suffix)
- ✅ Supports **foreign key constraints**
- ✅ Adds **default values** to migration fields
- ✅ Type-aware validation rules (e.g., `string`, `integer`, `boolean`)
- ✅ Artisan-based generation: fast and developer-friendly
- ✅ **--type** flag to specific crud type api or web based( with default is api)
- ✅ **--exclude** flag to skip generating specific files
- ✅ Built-in Pest tests
- ✅ Code refactoring via Rector

---

🚀 Usage

```
php artisan make:crud ModelName --fields="field:type|rule1|rule2;another:foreign~|constrained:table" --type=api|web --exclude=model,..

```

Example 1:
----------

[](#example-1)

To create crud without foreignKey

```
php artisan make:crud Department --fields="name:string|max:255;created_by:foreign~|constrained:users"

```

Example 2:
----------

[](#example-2)

To create crud with required foreignKey column and with constrained

```
php artisan make:crud Department --fields="name:string;created_by:foreign|constrained:users|onDelete:cascade"

```

Example 3:
----------

[](#example-3)

To create crud with nullable foreignKey column

```

php artisan make:crud Department --fields="name:string;created_by:foreign~|constrained:hospitals"

```

Example 4:
----------

[](#example-4)

To create crud with default value column

```
php artisan make:crud Department --fields="name:string;status:boolean~|default:true"

```

These all will Generate
-----------------------

[](#these-all-will-generate)

- app/Models/Department.php
- app/Http/Controllers/DepartmentController.php
- app/Http/Requests/DepartmentRequest.php
- app/Http/Resources/DepartmentResource.php
- database/migrations/xxxx\_xx\_xx\_create\_departments\_table.php
- Adds route in routes/api.php

### Example 6:

[](#example-6)

Exclude Model and Migration

```
php artisan make:crud Department --fields="name:string" --type=api --exclude=model,migration

```

Skips model and migration, still creates controller, request, and resource.

Field Syntax
------------

[](#field-syntax)

Each field uses the format:

```
column_one_name:data_type[~]|rules|default:xyz;column_two_name:foreignId[~]|constrained:table

```

Supported Field Types
---------------------

[](#supported-field-types)

You can use any of the following Laravel migration column types:

string, text, boolean, integer, decimal, date, uuid, json, timestamp, etc.

Foreign key via foreign, e.g., user\_id:foreign~|constrained:users

Nullable fields: suffix type with `~`, e.g., email:string~

Default values: default:value, e.g., status:boolean|default:true

column Modifiers
----------------

[](#column-modifiers)

- ` ~ :` Makes the field nullable
- ` default:value :` Sets a default value in the migration
- ` constrained :` Adds a foreign key constraint
- ` onDelete:CASCADE :` Adds delete behavior for foreign keys

### 🆕 New in v2

[](#-new-in-v2)

🎯 `--type=api`: generates API controller and resource only

🎯 `--type=web`: generates web controller and Blade views

✂️ `--exclude`=model,migration,request,route,views,resource,controller: skip generating specific components

### ⚠️ Default Behavior

[](#️-default-behavior)

If `--type` is not specified, the command defaults to type=api.

```
php artisan make:crud Book --fields="title:string;author:string"

```

This is equivalent to:

```
php artisan make:crud Book --fields="title:string;author:string" --type=api

```

By default, it generates API-related files:

- API Controller
- API Resource
- Form Request
- Model
- Migration
- Adds route to api.php

### Example 5:

[](#example-5)

Web CRUD with Blade Views

```
php artisan make:crud Article --fields="title:string;content:text" --type=web

```

### Generates:

[](#generates)

- Model, Migration
- Blade Views: resources/views/articles/\*.blade.php
- Web\\ArticleController
- Route in web.php

### Example 5:

[](#example-5-1)

Web CRUD with Blade Views

```
php artisan make:crud Article --fields="title:string;content:text" --type=web --exclude=migration,model

```

### Generates only:

[](#generates-only)

- Blade Views: resources/views/articles/\*.blade.php
- Web\\ArticleController
- Route in web.php

Testing
-------

[](#testing)

This package uses Pest for testing:

```
composer test

```

Refactoring
-----------

[](#refactoring)

This package uses [Rector](https://github.com/rectorphp/rector) for automated code refactoring and PHP/Laravel upgrades:

```
composer rector
```

🛠 Dev Requirements
------------------

[](#-dev-requirements)

- PHP ^8.1
- Laravel ^10 or ^11 or ^12
- PestPHP for testing
- Laravel pint for code style fixer

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

🧑 Author
--------

[](#-author)

Sandeep Pant

📧

License
-------

[](#license)

This package is open-sourced software licensed under the MIT License.

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance54

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Total

8

Last Release

308d ago

Major Versions

v1.0.2 → v2.0.02025-07-14

### Community

Maintainers

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

---

Top Contributors

[![SandeepX](https://avatars.githubusercontent.com/u/47293893?v=4)](https://github.com/SandeepX "SandeepX (28 commits)")

---

Tags

phpapiweblaravelmigrationpackagecode generatorscaffoldmodelartisanlaravel-packageresourceboilerplatecontrollerbackendcrud generatorrapid-developmentlaravel-apirequest validationlaravel-toolkitdeveloper toolapi-crudcrudifydeveloper-helperweb-crud

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mrincognito-crudify/health.svg)

```
[![Health](https://phpackages.com/badges/mrincognito-crudify/health.svg)](https://phpackages.com/packages/mrincognito-crudify)
```

###  Alternatives

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7012.8k](/packages/tehwave-laravel-achievements)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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