PHPackages                             arrahmouni/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. [Admin Panels](/categories/admin)
4. /
5. arrahmouni/crud-generator

ActiveLibrary[Admin Panels](/categories/admin)

arrahmouni/crud-generator
=========================

Generate crud for laravel modules

2.0.0(1mo ago)0200↓100%MITPHPPHP ^8.0

Since Mar 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/arrahmouni/crud-generator)[ Packagist](https://packagist.org/packages/arrahmouni/crud-generator)[ RSS](/packages/arrahmouni-crud-generator/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (6)Used By (0)

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

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

[![Laravel CRUD Generator](https://camo.githubusercontent.com/4cb8fca7c2a99af1ab0187368b90c2e16f715be4cabe4d2d26ceb1adc3150234/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d435255445f47656e657261746f722d627269676874677265656e)](https://camo.githubusercontent.com/4cb8fca7c2a99af1ab0187368b90c2e16f715be4cabe4d2d26ceb1adc3150234/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d435255445f47656e657261746f722d627269676874677265656e)[![License](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)

A powerful CLI tool to generate complete CRUD operations with translations, permissions, and modular architecture support.

📦 Features
----------

[](#-features)

- **One-Command CRUD Generation**
- **API or Web CRUD** – Choose between API-only (admin panel API) or web CRUD (with optional views)
- **Multilingual Support** (Model translations + migration translations)
- **Modular Architecture** (Works with [nwidart/laravel-modules](https://github.com/nwidart/laravel-modules))
- **Optional Components**:
    - Soft Delete &amp; Disabled Status
    - Admin CRUD Controller (web or API)
    - Front (user) API Controller
    - Permissions System
    - Factories &amp; Seeders
    - Form Requests
    - Blade Views (web CRUD only)
- **API Controller Structure** – Controllers under `Api/Admin` (admin) and `Api/Front` (user-facing)
- **Custom Stub Support**
- **Automatic Route Generation** (web.php or api.php)
- **Permission Seeding**

🚀 Installation
--------------

[](#-installation)

1. Install via Composer:

```
composer require arrahmouni/crud-generator
```

2. Publish configuration and stubs:

```
php artisan vendor:publish --provider="CrudGeneratorServiceProvider" --tag=config
php artisan vendor:publish --provider="CrudGeneratorServiceProvider" --tag=stubs
```

🛠 Configuration
---------------

[](#-configuration)

Edit `config/crud.php` to customize:

```
return [
    'stub_path' => resource_path('stubs/'), // Custom stub path
    // Add other configuration parameters
];
```

🎯 Basic Usage
-------------

[](#-basic-usage)

Generate a full CRUD structure with interactive prompts:

```
php artisan create:crud ModelName ModuleName
```

**Example** - Create a Product CRUD in Catalog module:

```
php artisan create:crud Product Catalog
```

🔧 Command Workflow
------------------

[](#-command-workflow)

**First question:** Do you want to create an **API** or a **web** CRUD?

- **API CRUD** – Admin panel API only (no views). Routes go to `api.php`. Admin API controller uses `BaseApiCrudController` (permissions, soft delete, disabled, bulk actions).
- **Web CRUD** – Admin panel with optional Blade views. Routes go to `web.php`. Optional front (user) API controller in `Api/Front`.

Then you'll be asked:

- Soft Delete
- Disabled Status
- Translations
- Migrations
- Factories
- Seeders
- Requests
- **Admin CRUD controller** (web controller in `Admin/` or API controller in `Api/Admin/` depending on API vs web)
- **Front API controller** (user-facing API in `Api/Front/`)
- Paginate API controller(s)
- Permissions
- Views (web CRUD only; not asked for API CRUD)

📂 Generated Structure
---------------------

[](#-generated-structure)

**Web CRUD** (when web is chosen):

```
ModuleName/
├── Entities/
│   └── ModelName.php
├── Http/
│   ├── Controllers/Admin/
│   │   └── ModelNameController.php
│   ├── Controllers/Api/
│   │   ├── Admin/          (optional, when admin API crud)
│   │   │   └── ModelNameController.php
│   │   └── Front/          (optional, front API controller)
│   │       └── ModelNameController.php
│   ├── Services/
│   └── Requests/
├── Resources/
│   ├── ModelNameResource.php
│   └── views/...           (optional)
├── Database/
│   ├── migrations/
│   ├── factories/
│   └── seeders/
└── Routes/
    ├── web.php             (admin web routes)
    └── api.php             (admin API and/or front API routes)

```

**API CRUD** (when API is chosen): same as above but no views; admin CRUD controller is generated in `Api/Admin/` (extends `BaseApiCrudController`). The service does not include the `getDataTable` method (used only for web admin).

🔄 Post-Creation Steps
---------------------

[](#-post-creation-steps)

**If permissions were created:**

1. Add the translation key to the seeder file in the `ability_group` section
2. Add the model icon in the Permission module config
3. Add any additional permissions in the Permission module config

**Web CRUD:**

- Add translation keys in `admin::dashboard` (aside\_menu: `{model}_management`)
- Add translation keys in `admin::cruds`
- Add translation keys in `admin::datatables`

**API CRUD:**

- Register admin API routes in the module `api.php` if needed (middleware, prefix)

**Sync permissions:**

```
php artisan module:seed Permission
```

**Run migrations:**

```
php artisan module:migrate ModuleName
```

🛡 Service Provider
------------------

[](#-service-provider)

The `CrudGeneratorServiceProvider` handles:

- Command registration
- Stub path configuration
- Package asset publishing
- Configuration management

📜 License
---------

[](#-license)

This package is open-source software licensed under the [MIT license](LICENSE.md).

🤝 Contributing
--------------

[](#-contributing)

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

**Happy CRUD Generation!** 🚀

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

5

Last Release

50d ago

Major Versions

v1.1.0 → 2.0.02026-02-02

### Community

Maintainers

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

---

Top Contributors

[![arrahmouni](https://avatars.githubusercontent.com/u/49792530?v=4)](https://github.com/arrahmouni "arrahmouni (16 commits)")

---

Tags

laravelgeneratormodulescrudar-rahmouni

### Embed Badge

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

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

###  Alternatives

[crestapps/laravel-code-generator

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.

77290.6k1](/packages/crestapps-laravel-code-generator)

PHPackages © 2026

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