PHPackages                             nijwel/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. [Framework](/categories/framework)
4. /
5. nijwel/crud-generator

ActiveLibrary[Framework](/categories/framework)

nijwel/crud-generator
=====================

A package to generate CRUD controllers, models, and migrations.

1.0.0(1y ago)020MITPHPPHP &gt;=7.4

Since Sep 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nijwel/crud-generator)[ Packagist](https://packagist.org/packages/nijwel/crud-generator)[ RSS](/packages/nijwel-crud-generator/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

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

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

This Laravel package helps to automate the creation of basic CRUD (Create, Read, Update, Delete) functionality, including models, controllers, and migrations. You can also generate API-specific controllers by passing the `--api` option when running the command. github :

Features
--------

[](#features)

- Generate Model, Controller, and Migration files for CRUD functionality.
- Supports both web and API-based CRUD methods.
- Automatic namespace generation based on the provided input.
- Customizable stubs for model, controller, and migration templates.

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

[](#installation)

To use this package, follow these steps:

### 1. Require the Package

[](#1-require-the-package)

```
composer require nijwel/crud-generator
```

### 2. Publish the Stub Files (optional)

[](#2-publish-the-stub-files-optional)

If you want to customize the stub templates for your project, publish the stub files:

```
php artisan vendor:publish --tag=crud-stubs
```

This will copy the stub files into your stubs directory, where you can customize them to fit your needs.

Usage
-----

[](#usage)

Once the package is installed, you can generate CRUD operations with the following command:

### 1. Generate Standard CRUD (Model, Controller, Migration)

[](#1-generate-standard-crud-model-controller-migration)

To generate standard CRUD methods (suitable for web applications with views), use:

```
php artisan make:crud {ModelName}
```

Example:

```
php artisan make:crud Product
```

This will create:

- A model Product.php in the app/Models/ directory.
- A controller ProductController.php in the app/Http/Controllers/ directory.
- A migration file in the database/migrations/ directory.

### 2. Generate API-Specific CRUD

[](#2-generate-api-specific-crud)

To generate API-based CRUD methods that return JSON responses, add the --api option:

```
php artisan make:crud {ModelName} --api
```

Example:

```
php artisan make:crud Product --api --m --db --r
```

This will create:

- A model Product.php in the app/Models/ directory.
- An API-specific controller ProductController.php that returns JSON responses.
- A migration file in the database/migrations/ directory.
- Some route content in the routes/web.

Note:

- if you need only api controller just call --api
- if you need only model just call --m
- if you need only DB just call --db
- if you need only route content just call --r

### 3. Generate CRUD with Namespace

[](#3-generate-crud-with-namespace)

If you want to generate files within a specific namespace, use forward slashes (/) to define the namespace.

This will create:

- A model Product.php in app/Models/Admin/
- A controller ProductController.php in app/Http/Controllers/Admin/
- A migration file for the products table.

Customizing Stubs
-----------------

[](#customizing-stubs)

You can customize the stubs used for generating models, controllers, and migrations by publishing the stub files:

```
php artisan vendor:publish --tag=crud-stubs
```

The following stubs will be published:

- controller.stub: For standard controllers.
- controller.api.stub: For API controllers.
- model.stub: For models.
- migration.stub: For migration files.

After publishing, you can find and edit the stubs in the stubs directory to suit your needs.

License
-------

[](#license)

This package is open-source software licensed under the MIT license.

Contribution
------------

[](#contribution)

Feel free to fork this package, open issues, or submit pull requests for improvements and bug fixes.

Credits
-------

[](#credits)

Developed by Nijwel.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

643d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58605617?v=4)[Nazrul Islam](/maintainers/Nijwel)[@nijwel](https://github.com/nijwel)

---

Top Contributors

[![nijwel](https://avatars.githubusercontent.com/u/58605617?v=4)](https://github.com/nijwel "nijwel (18 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)

PHPackages © 2026

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