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

ActiveLibrary[Framework](/categories/framework)

tgrwirapmbd/crud-generator-laravel
==================================

A package to generate CRUD operations easily.

022↓50%PHPCI passing

Since Jul 14Pushed 2w agoCompare

[ Source](https://github.com/tegarwirapmbd12/fastcrud-v2)[ Packagist](https://packagist.org/packages/tgrwirapmbd/crud-generator-laravel)[ RSS](/packages/tgrwirapmbd-crud-generator-laravel/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/265a6be7e67bd9dcca0b620f0b2d55b670c663b48d9af710228677eb41adf634/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74677277697261706d62642f637275642d67656e657261746f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tgrwirapmbd/crud-generator-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/342212ecb77fd992dfa051e523b0fdfcba7a135968503c6ebbcabf6a3c7f5470/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74677277697261706d62642f637275642d67656e657261746f722d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/amdad121/crud-generator-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6d07202660e813e56baaeb929b9e33f7e586fd953578c8e721f15590914d2e3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616d6461643132312f637275642d67656e657261746f722d6c61726176656c2f6c696e742e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/amdad121/crud-generator-laravel/actions?query=workflow%3A%22Fix+Code+Style%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/215371a3d45123761230ac1540882cbe4638979c5b462958a7699a52c1bc0858/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74677277697261706d62642f637275642d67656e657261746f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tgrwirapmbd/crud-generator-laravel)

Overview
--------

[](#overview)

The **CRUD Generator** package for Laravel is a command-line tool that helps you quickly create a complete CRUD (Create, Read, Update, Delete) setup for your models, including migration files, controllers, and Blade views. This package streamlines the development process by generating the necessary files with minimal input from the developer.

Features
--------

[](#features)

- Generate models with fillable properties.
- Generate repositories with basic CRUD methods.
- Create migration files with specified fields.
- Generate controllers with all necessary CRUD methods.
- Create Blade views for listing, creating, editing, and showing model instances.
- Automatically add resource routes to `web.php`.

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

[](#requirements)

- PHP &gt;= 8.2
- Laravel &gt;= 10.x

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

[](#installation)

1. **Install the package via Composer**:

    ```
    composer require tgrwirapmbd/crud-generator-laravel:@dev
    ```
2. **Register the Service Provider (if not using auto-discovery)**:

    In config/app.php, add the service provider to the providers array:

    ```
    Tgrwirapmbd\CRUDGenerator\CrudServiceProvider::class,
    ```
3. **Publish the configuration file (optional)**:

    You can publish the configuration file to customize the package behavior:

    ```
    php artisan vendor:publish --provider="Tgrwirapmbd\CRUDGenerator\CrudServiceProvider"
    ```

    This will create a crud\_generator.php file in your config directory.

Usage
-----

[](#usage)

To generate CRUD resources, use the following Artisan command:

```
php artisan make:crud {name} {--fields=} {--sidenav-name=} {--sidenav-icon=}
```

### Parameters

[](#parameters)

{name} (optional): The name of the model you want to create. {--fields=} (optional): A comma-separated list of fields for the model, in the format fieldName:fieldType. Add `:nullable` to make one generated migration column nullable. {--sidenav-name=} (optional): Custom sidebar navigation label. {--sidenav-icon=} (optional): Custom sidebar icon name from [Lucide Icons](https://lucide.dev/icons).

### Example

[](#example)

1. **Generate a CRUD setup for a Post model with fields: title (string) and content (text)**:

    ```
    php artisan make:crud Post --fields="title:string,content:text"
    ```

    To make a specific column nullable:

    ```
    php artisan make:crud Post --fields="title:string,subtitle:string:nullable,content:text"
    ```
2. **Generate a CRUD setup with a custom sidenav label and Lucide icon**:

    ```
    php artisan make:crud ProductCategory --fields="name:string" --sidenav-name="Product Category" --sidenav-icon="package"
    ```
3. **If you do not provide the --fields option, you will be prompted to enter fields interactively**:

    ```
    php artisan make:crud
    ```

    You will then enter model and field names and types one by one until you finish.

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

[](#generated-files)

The command will create the following files:

**Model**: `app/Models/Post.php`

**Repository**: `app/Repositories/PostRepository.php`

**Migration**: `database/migrations/YYYY_MM_DD_HHMMSS_create_posts_table.php`

**Controller**: `app/Http/Controllers/PostController.php`

**Blade Views**:

`resources/views/posts/index.blade.php`

`resources/views/posts/create.blade.php`

`resources/views/posts/edit.blade.php`

`resources/views/posts/show.blade.php`

**Resource Routes**: Automatically added to `routes/web.php`

Configuration
-------------

[](#configuration)

You can customize the behavior of the CRUD generator by modifying the `config/crud_generator.php` file. The following options are available:

`generate_model`: Generate a model (default: true).

`generate_repository`: Generate a repository (default: true).

`generate_migration`: Generate a migration (default: true).

`generate_controller`: Generate a controller (default: true).

`generate_blade`: Generate Blade views (default: true).

`generate_sidenav`: Add a generated sidebar navigation item to the app layout (default: true).

`sidenav_default_icon`: Default Lucide icon when no custom icon is provided (default: book-open-text).

`generate_routes`: Add resource routes (default: true).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

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

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance63

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

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://www.gravatar.com/avatar/14a33cb7393bf813f4e9c70e908d10c30e9efd508bef0db902b16835c407449e?d=identicon)[tegarwirapmbd12](/maintainers/tegarwirapmbd12)

---

Top Contributors

[![tegarwirapmbd12](https://avatars.githubusercontent.com/u/122960406?v=4)](https://github.com/tegarwirapmbd12 "tegarwirapmbd12 (6 commits)")

### Embed Badge

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

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

###  Alternatives

[nineinchnick/edatatables

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

173.2k](/packages/nineinchnick-edatatables)[alizharb/laravel-modular

A professional, framework-agnostic modular architecture for Laravel 11+. Features zero-config autoloading, 29+ Artisan command overrides, and seamless Vite integration.

211.6k9](/packages/alizharb-laravel-modular)[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)
