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

ActiveLibrary[Admin Panels](/categories/admin)

iipokypatop/laravel-code-generator
==================================

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

v2.2.5(8y ago)140MITPHP

Since Dec 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/iipokypatop/laravel-code-generator)[ Packagist](https://packagist.org/packages/iipokypatop/laravel-code-generator)[ RSS](/packages/iipokypatop-laravel-code-generator/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (1)Versions (27)Used By (0)

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://crestapps.com/laravel-code-generator/docs/2.2 "Laravel Code Generator Documentation")

Features
--------

[](#features)

- Create very clean, reusable and highly readable code to build on.
- Create full resources using a single command with **migration** or from **existing database**.
- Creates full resources for all of the existing tables in the database using one command.
- Allows you to save the fields in a JSON file and recreate resources when the business needs changes.
- Utilizes JSON based resource-file to allow you to define your resources. Resource-file allows you to easily regenerate the resource at any time even when the business rules change.
- Create standard CRUD controllers with simple or form-request validation.
- Customizable view’s templates to enable you to change the standard look and feel of your application.
- Create model with relations.
- Create named routes with and without group.
- Create standard CRUD views.
- Smart migration engine! Keeps track of all generated migrations to only create the needed migration.
- Intelligent enough to automatically handles the relations between the models.
- Very flexible and rich with configurable options.
- Easy commands to create resource-file; additionally, add or reduce existing resource-file.
- Full capability to generate multi-languages applications.
- Client-side validation.
- File uploading handling.
- Auto store multiple-response in the database.
- Create form-request to clean up your controller and increase your code reusability.
- Create view's layouts with and without client-side validation.
- Change the template at run time to generate different views.
- Ability to generate views with and without Laravel-Collective.
- Nicely handles any date, time or datetime field.
- Auto handles any boolean field.
- Very easy to use with lots of documentation.

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');
    }

    ```
3. Execute the following command from the command-line to publish the package's config and the default template to start generating awesome code.

    ```
    php artisan vendor:publish --provider="CrestApps\CodeGenerator\CodeGeneratorServiceProvider" --tag=default

    ```

> A layout is required for the default views! The code generator allows you to create a layout using the command-line. Of cource you can use your own layout. You'll only need to include [CSS bootstrap framework](http://getbootstrap.com/ "CSS bootstrap framework") in your layout for the default templates to work properly. Additionally, you can chose to you design your own templetes using a different or no css framework.

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:layout \[application-name\]
    - php artisan create:resources \[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
- **Views commands**
    - 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

> Full documentation available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/docs/2.2 "Laravel Code Generator Documentation").

> Live demo is available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/demos/v2-2 "Laravel Code Generator Live Demo").

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:resources 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:resources 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:resources 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:resources 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:resources 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:form-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:resources 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:form-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:form-database AssetCategory --translation-for=en,ar`
>
> `php artisan create:resources 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!

Prologue
--------

[](#prologue)

- [Release Notes](https://crestapps.com/laravel-code-generator/docs/2.2#release-notes)
- [Upgrade Guide](https://crestapps.com/laravel-code-generator/docs/2.2#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

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 63.1% 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 ~13 days

Recently: every ~6 days

Total

25

Last Release

3149d ago

Major Versions

v1.2.1 → v2.0.02017-05-23

v2.2.6.x-dev → 3.0.0.x-dev2017-11-15

### Community

Maintainers

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

---

Top Contributors

[![MikeAlhayek](https://avatars.githubusercontent.com/u/24724371?v=4)](https://github.com/MikeAlhayek "MikeAlhayek (89 commits)")[![malhayek2014](https://avatars.githubusercontent.com/u/6562258?v=4)](https://github.com/malhayek2014 "malhayek2014 (45 commits)")[![iipokypatop](https://avatars.githubusercontent.com/u/4989537?v=4)](https://github.com/iipokypatop "iipokypatop (2 commits)")[![qcol](https://avatars.githubusercontent.com/u/358993?v=4)](https://github.com/qcol "qcol (2 commits)")[![icqparty](https://avatars.githubusercontent.com/u/1787971?v=4)](https://github.com/icqparty "icqparty (1 commits)")[![eduardoarandah](https://avatars.githubusercontent.com/u/4065733?v=4)](https://github.com/eduardoarandah "eduardoarandah (1 commits)")[![coding-sunshine](https://avatars.githubusercontent.com/u/3206025?v=4)](https://github.com/coding-sunshine "coding-sunshine (1 commits)")

---

Tags

laravelgeneratorcode generatorcrudgeneratorscrud generatorlaravel crud generatorlaravel code generatorlaravel crudlaravel crud buildercrud builderviews creatorroutes creatorcontroller creatorCrestAppsAlhayekMike AlhayekMajd Alhayek

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/iipokypatop-laravel-code-generator/health.svg)](https://phpackages.com/packages/iipokypatop-laravel-code-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.

76194.7k1](/packages/crestapps-laravel-code-generator)[takielias/tablar-crud-generator

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

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

PHPackages © 2026

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