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 1mo 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

24

—

LowBetter than 32% of packages

Maintenance36

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

589d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1db0a2af4dc84ef370e4eabbf851e559ea37b1be0d4805ff16fbfbdaa9eecb26?d=identicon)[Nijwel](/maintainers/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/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M600](/packages/laravel-ui)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)

PHPackages © 2026

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