PHPackages                             shehroz/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. shehroz/crud-generator

ActiveLibrary[Framework](/categories/framework)

shehroz/crud-generator
======================

Laravel package to generate full CRUD (controllers, models, requests, repositories, policies, migrations, seeders, and Tailwind views) with repository pattern, role-based policies, and optional API routes.

130PHP

Since Jun 27Pushed 6mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Shehroz CRUD Generator
======================

[](#shehroz-crud-generator)

A powerful Laravel package to generate complete CRUD operations with roles, permissions, policies, and optional API support. Compatible with Laravel 9, 10, and 11.

Features
--------

[](#features)

- Generates controllers, models, requests, repositories, interfaces, policies, migrations, seeders, and views.
- Supports nested paths (e.g., `admin/location`).
- Optional API CRUD generation with `--api` or `--both` flags.
- Modern Tailwind-based Blade templates for web interfaces.
- Role-based permissions using Laravel's authorization system.
- Compatible with PHP 8.1+ and Laravel 9, 10, and 11.

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

[](#installation)

Install the package via Composer:

```
composer require shehroz/crud-generator
```

Publish the stubs (optional, to customize templates):

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

Usage
-----

[](#usage)

Run the `make:crud` command to generate CRUD components:

```
php artisan make:crud ModelName
```

### Options

[](#options)

- `--api`: Generates only API CRUD (API controller and routes).
- `--both`: Generates both web and API CRUDs.

### Examples

[](#examples)

Generate a CRUD for `Location` in the `admin` namespace:

```
php artisan make:crud admin/location
```

Generate an API-only CRUD for `Product`:

```
php artisan make:crud Product --api
```

Generate both web and API CRUDs for `Category`:

```
php artisan make:crud Category --both
```

Generated Files
---------------

[](#generated-files)

- **Controller**: `App\Http\Controllers\[Namespace]\ModelNameController.php`
- **API Controller**: `App\Http\Controllers\Api\[Namespace]\ModelNameController.php` (with `--api` or `--both`)
- **Model**: `App\Models\[Namespace]\ModelName.php`
- **Request**: `App\Http\Requests\[Namespace]\ModelNameRequest.php`
- **Repository**: `App\Repositories\[Namespace]\ModelNameRepository.php`
- **Interface**: `App\Repositories\Interfaces\[Namespace]\ModelNameRepositoryInterface.php`
- **Policy**: `App\Policies\[Namespace]\ModelNamePolicy.php`
- **Migration**: `database/migrations/YYYY_MM_DD_HHMMSS_create_model_table.php`
- **Seeder**: `database/seeders/ModelNameSeeder.php`
- **Views**: `resources/views/[namespace]/modelname/*.blade.php` (for web CRUD)

Requirements
------------

[](#requirements)

- PHP: ^8.1|^8.2|^8.3
- Laravel: ^9.0|^10.0|^11.0

License
-------

[](#license)

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

Author
------

[](#author)

Muhammad Shehroz - [LinkedIn](https://www.linkedin.com/in/muhammadshehroz97/)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance47

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

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

---

Top Contributors

[![shehroz9712](https://avatars.githubusercontent.com/u/78542541?v=4)](https://github.com/shehroz9712 "shehroz9712 (24 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M297](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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