PHPackages                             crestapps/laravel-code-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. crestapps/laravel-code-generator

ArchivedLibrary[Admin Panels](/categories/admin)

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.

v3.0.2(2y ago)76196.0k↓36%154[37 issues](https://github.com/CrestApps/laravel-code-generator/issues)[9 PRs](https://github.com/CrestApps/laravel-code-generator/pulls)1MITPHPCI failing

Since Dec 31Pushed 3w ago40 watchersCompare

[ Source](https://github.com/CrestApps/laravel-code-generator)[ Packagist](https://packagist.org/packages/crestapps/laravel-code-generator)[ GitHub Sponsors](https://github.com/malhayek)[ RSS](/packages/crestapps-laravel-code-generator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (67)Used By (1)

[![Tweet](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=An%20intelligent%20code%20generator%20for%20Laravel%20framework%20which%20will%20save%20you%20lots%20of%20time!&url=https://github.com/CrestApps/laravel-code-generator&hashtags=laravel,laravel-code-generator,laravel-crud,code-generator,crud-generator,laravel-crud-generator)

Introduction
------------

[](#introduction)

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.

For full documentation and live demo please visit [CrestApps.com](https://laravel-code-generator.crestapps.com "Laravel Code Generator Documentation")

Features
--------

[](#features)

- Craft clean, reusable, and highly readable code for seamless development.
- Generate complete resources effortlessly with a single command, supporting both migration and existing database scenarios.
- Streamline resource creation for all existing database tables with a single command.
- Save and recreate fields using a JSON file, ensuring adaptability to changing business needs.
- Leverage JSON-based resource files for easy regeneration, even when business rules evolve.
- Generate standard CRUD controllers with simple or form-request validation.
- Customize view templates to alter the standard look and feel of your application.
- Create models with relations for comprehensive data representation.
- Establish named routes with and without grouping for efficient navigation.
- Generate standard CRUD views to facilitate a consistent user experience.
- Smart migration engine tracks generated migrations to only create necessary ones.
- Intelligent handling of model relations to simplify development.
- Highly flexible with rich configurable options to suit diverse needs.
- Easy commands for resource-file creation, addition, or reduction.
- Full support for generating multi-language applications.
- Implement client-side validation for enhanced user interaction.
- Efficiently handle file uploading and store multiple responses in the database.
- Generate form-request to clean up controllers and boost code reusability.
- Create view layouts with and without client-side validation.
- Change templates at runtime for diverse view generation.
- Ability to generate views with or without Laravel-Collective integration.
- Seamless handling of date, time, or datetime fields.
- Automatic management of boolean fields for hassle-free development.

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

[](#installation)

1. To download this package into your Laravel project, use the command-line to execute the following command

    ```
    composer require crestapps/laravel-code-generator --dev

    ```
2. **(You may skip this step when using Laravel &gt;= 5.5)** To bootstrap the packages into your project while using command-line only, open the app/Providers/AppServiceProvider.php file in your project. Then, add the following code to the register() method.

    Add the following line to bootstrap `laravel-code-generator` to the framework.

    ```
    if ($this->app->runningInConsole()) {
        $this->app->register('CrestApps\CodeGenerator\CodeGeneratorServiceProvider');
    }

    ```

Lessons
-------

[](#lessons)

Checkout our channel on [YouTube.com](https://www.youtube.com/channel/UCkEd0nOoRf3o0ahspAu7Y9w/videos "CrestApps YouTube Channel")

-
-

Available Commands
------------------

[](#available-commands)

> The command in between the square brackets **\[\]** must be replaced with a variable of your choice.

- **Main commands**
    - php artisan create:scaffold \[model-name\]
    - php artisan create:controller \[model-name\]
    - php artisan create:model \[model-name\]
    - php artisan create:form-request \[model-name\]
    - php artisan create:routes \[model-name\]
    - php artisan create:migration \[model-name\]
    - php artisan create:language \[model-name\]
    - php artisan create:mapped-resources
- **API commands**
    - php artisan create:api-scaffold \[model-name\]
    - php artisan create:api-controller \[model-name\]
    - php artisan create:api-resources \[model-name\]
- **API Documentations commands**
    - php artisan api-docs:scaffold \[model-name\]
    - php artisan api-doc:create-controller \[model-name\]
    - php artisan api-doc:create-view \[model-name\]
- **Views commands**
    - php artisan create:layout \[application-name\]
    - php artisan create:views \[model-name\]
    - php artisan create:index-view \[model-name\]
    - php artisan create:create-view \[model-name\]
    - php artisan create:edit-view \[model-name\]
    - php artisan create:show-view \[model-name\]
    - php artisan create:form-view \[model-name\]
- **Resource's files commands**
    - php artisan resource-file:from-database \[model-name\]
    - php artisan resource-file:create \[model-name\]
    - php artisan resource-file:append \[model-name\]
    - php artisan resource-file:reduce \[model-name\]
    - php artisan resource-file:delete \[model-name\]
- **Migration commands**
    - php artisan migrate-all
    - php artisan migrate:rollback-all
    - php artisan migrate:reset-all
    - php artisan migrate:refresh-all
    - php artisan migrate:status-all

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

[](#contribution)

Are you interested in supporting this project and making a contribution? Here's how you can get involved:

- Begin by showing your appreciation for this package on GitHub by giving it a **star**.
- Share this project with others to encourage ongoing enhancements and the introduction of new features.
- Report any bugs, provide comments, share ideas, or express your thoughts about this project by creating an issue on GitHub.
- Contributors are encouraged! If you're passionate about this project, consider addressing existing issues by submitting a pull request.
- If possible, consider [sponsoring the project](https://github.com/sponsors/CrestApps).

What did you create with this package?
--------------------------------------

[](#what-did-you-create-with-this-package)

I'd love to know if your site was generated using this package and list your logo on the documentation site. Please email using my contact info found in `composer.json` file.

Examples
--------

[](#examples)

The following example assumes that we are trying to create a CRUD called AssetCategory with the fields listed below.

- id
- name
- description
- is\_active

#### Basic example - CRUD with migration

[](#basic-example---crud-with-migration)

> `php artisan resource-file:create AssetCategory --fields=id,name,description,is_active`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> `php artisan create:scaffold AssetCategory --with-migration`
>
> The above command will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!

#### Basic example - CRUD with migration - Shortcut

[](#basic-example---crud-with-migration---shortcut)

> `php artisan create:scaffold AssetCategory --with-migration --fields=id,name,description,is_active`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json first. Then, it will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!. This is a short way to issuing both `resource-file:create` and `create:scaffold` in one line

#### Basic API example - CRUD with migration

[](#basic-api-example---crud-with-migration)

> `php artisan resource-file:create AssetCategory --fields=id,name,description,is_active`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> `php artisan create:scaffold AssetCategory --with-migration`
>
> The above command will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!

#### Basic example using translations for English and Arabic - with migration

[](#basic-example-using-translations-for-english-and-arabic---with-migration)

> `php artisan resource-file:create AssetCategory --fields=id,name,description,is_active --translation-for=en,ar`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> `php artisan create:scaffold AssetCategory --with-migration`
>
> The above command will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!

#### Basic example with form-request

[](#basic-example-with-form-request)

> `php artisan resource-file:create AssetCategory --fields=id,name,description,is_active`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> `php artisan create:scaffold AssetCategory --with-form-request`
>
> The above command will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and app/Http/Requests/AssetCategoriesFormRequest class!

#### Basic example with soft-delete and migration

[](#basic-example-with-soft-delete-and-migration)

> `php artisan resource-file:create AssetCategory --fields=id,name,description,is_active`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> `php artisan create:scaffold AssetCategory --with-soft-delete --with-migration`
>
> The above command will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration file!

#### Creating resources from existing database

[](#creating-resources-from-existing-database)

> `php artisan create:scaffold AssetCategory --table-exists`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json. It is going to assume that the table name is called "asset\_categories" in your database. If that is not the case, you can use --table-name=some\_other\_table\_name
>
> Then it will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views and the routes!
>
> You may also create a resource-file from existing database separately using `php artisan resource-file:from-database AssetCategory`

#### Creating resources from existing database with translation for English and Arabic

[](#creating-resources-from-existing-database-with-translation-for-english-and-arabic)

> `php artisan create:scaffold AssetCategory --translation-for=en,ar --table-exists`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> Then it will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views and the routes!
>
> You may also create a resource-file from existing database separately using `php artisan resource-file:from-database AssetCategory --translation-for=en,ar`

#### Creating resources from existing database with translation for English and Arabic in two step for better control over the fields!

[](#creating-resources-from-existing-database-with-translation-for-english-and-arabic-in-two-step-for-better-control-over-the-fields)

> `php artisan resource-file:from-database AssetCategory --translation-for=en,ar`
>
> `php artisan create:scaffold AssetCategory`
>
> The above command will create resource-file names /resources/laravel-code-generator/sources/asset\_categories.json
>
> Then it will create a model app/Models/AssetCategory, a controller app/Http/Controllers/AssetCategoriesController, all views and the routes!

s

- [Upgrade Guide](https://crestapps.com/laravel-code-generator/docs/2.3#upgrade-guide)

License
-------

[](#license)

"Laravel Code Generator" is an open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT "MIT license")

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance61

Regular maintenance activity

Popularity55

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 69.5% 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 ~55 days

Recently: every ~212 days

Total

49

Last Release

827d ago

Major Versions

v1.2.1 → v2.0.02017-05-23

v2.4.9 → v3.0.12024-01-28

### Community

Maintainers

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

---

Top Contributors

[![MikeAlhayek](https://avatars.githubusercontent.com/u/24724371?v=4)](https://github.com/MikeAlhayek "MikeAlhayek (228 commits)")[![malhayek2014](https://avatars.githubusercontent.com/u/6562258?v=4)](https://github.com/malhayek2014 "malhayek2014 (45 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![CyberiaResurrection](https://avatars.githubusercontent.com/u/9083866?v=4)](https://github.com/CyberiaResurrection "CyberiaResurrection (14 commits)")[![LoganGray](https://avatars.githubusercontent.com/u/191710?v=4)](https://github.com/LoganGray "LoganGray (8 commits)")[![moumenz](https://avatars.githubusercontent.com/u/34447112?v=4)](https://github.com/moumenz "moumenz (8 commits)")[![qcol](https://avatars.githubusercontent.com/u/358993?v=4)](https://github.com/qcol "qcol (2 commits)")[![steveijar](https://avatars.githubusercontent.com/u/13538573?v=4)](https://github.com/steveijar "steveijar (1 commits)")[![coding-sunshine](https://avatars.githubusercontent.com/u/3206025?v=4)](https://github.com/coding-sunshine "coding-sunshine (1 commits)")[![eduardoarandah](https://avatars.githubusercontent.com/u/4065733?v=4)](https://github.com/eduardoarandah "eduardoarandah (1 commits)")[![icqparty](https://avatars.githubusercontent.com/u/1787971?v=4)](https://github.com/icqparty "icqparty (1 commits)")[![knkhayam](https://avatars.githubusercontent.com/u/30225287?v=4)](https://github.com/knkhayam "knkhayam (1 commits)")[![kubre](https://avatars.githubusercontent.com/u/20380094?v=4)](https://github.com/kubre "kubre (1 commits)")[![chrishubert](https://avatars.githubusercontent.com/u/8528436?v=4)](https://github.com/chrishubert "chrishubert (1 commits)")

---

Tags

code-generationcode-generatorcrestappscrudcrud-buildercrud-generatorcrud-makergeneratorlaravel-code-generatorlaravel-crud-generatorlaravel-frameworklaravel-packagelaravel5-packagemike-alhayekphp-artisanview-creatorlaravelgeneratorcode generatorcrudgeneratorscrud generatorlaravel crud generatorlaravel code generatorlaravel crudlaravel crud buildercrud builderviews creatorroutes creatorcontroller creatorCrestAppsAlhayekMike AlhayekMajd Alhayek

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crestapps-laravel-code-generator/health.svg)

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

###  Alternatives

[takielias/tablar-crud-generator

Laravel Tablar Crud Generator based on https://github.com/takielias/tablar

326.2k](/packages/takielias-tablar-crud-generator)

PHPackages © 2026

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