PHPackages                             innova-studio/laravel-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. [API Development](/categories/api)
4. /
5. innova-studio/laravel-crud-generator

ActiveLibrary[API Development](/categories/api)

innova-studio/laravel-crud-generator
====================================

Laravel CRUD Generator is a library to automate the creation of files for Laravel APIs

1.0.0(1y ago)016MITPHPPHP &gt;=8.0

Since Mar 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Innova-Studio/laravel-crud-generator)[ Packagist](https://packagist.org/packages/innova-studio/laravel-crud-generator)[ RSS](/packages/innova-studio-laravel-crud-generator/feed)WikiDiscussions master Synced 1mo ago

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

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

[](#laravel-crud-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7b3206a33ffec6b6c0aaf38d08d6e785a51fa0e8c52b33aae4794679a094a174/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6e6f76612d73747564696f2f6c61726176656c2d637275642d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innova-studio/laravel-crud-generator)[![Total Downloads](https://camo.githubusercontent.com/dee36dd09828183bf693101e9f6af89bc2e6b81a8bd5a1e745632dba34d3d859/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6e6f76612d73747564696f2f6c61726176656c2d637275642d67656e657261746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innova-studio/laravel-crud-generator)

Laravel CRUD Generator is a library to automate the creation of files for Laravel APIs

---

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

[](#installation)

1. To install the package run

```
composer require --dev innova-studio/laravel-crud-generator
```

3. Add "InnovaStudio\\LaravelCrudGenerator\\LaravelCrudGeneratorServiceProvider::class," as a package service provider in your config/app.php file
4. To generate package config files run

```
php artisan crud:install
```

6. Update json file called "laravel-crud-generator.json" with all the things that you need
7. Run "php artisan crud:generate" to generate all the files for the definitions given at laravel-crud-generator.json file

---

General configuration
---------------------

[](#general-configuration)

Inside config folder you will find a file called "laravelCrudGenerator.php". There you can modify the default behavor of the generator. Here you have a table with all the attributes you can modify:

AttributeDescriptionTypeExample**default\_file\_path**Indicates the path to json filestring`'laravel-crud-generator.json'`**rewrite**Indicates if files are allowed to be rewritten if the generator runsboolean`false`**files**Indicates what type of files the generator is allowed to generate. All [types of file](#type-of-files) are listed in the example.array`["routes", "model", "controller", "migration", "resource", "factory", "service", "test", "mock" ]`**relations**Indicates the default relationships of the files generated. This is in case you need to stablish a relationship by default for all files.array of relations`[ [ "BelognsTo" => [ "General" => [ "related" => "App\\Models\\General" ] ] ] ]`**routes**Indicates the default configuration for routes filesarray`[ "use" => [], "traits" => [], "interfaces" => [], "extends" => null, "file_path" => "routes/entities", "namespace" => null, "rewrite" => false ]`**model**Indicates the default configuration for model filesarray`[ "use" => [], "traits" => [ 'Illuminate\\Database\\Eloquent\\Factories\\HasFactory' ], "interfaces" => [], "extends" => 'Illuminate\\Database\\Eloquent\\Model', "file_path" => "app/Models", "namespace" => "App\\Models", "rewrite" => false ]`**controller**Indicates the default configuration for controller filesarray`[ "use" => [],"traits" => [], "interfaces" => [], "extends" => 'App\\Http\\Controllers\\Controller', "file_path" => "app/Http/Controllers", "namespace" => "App\\Http\\Controllers", "methods" => [ "list", "show", "store", "update", "delete" ], "response" => "\\Illuminate\\Http\\JsonResponse", "rewrite" => false ]`**request**Indicates the default configuration for request filesarray`[ "use" => [], "traits" => [], "interfaces" => [], "extends" => 'Illuminate\\Foundation\\Http\\FormRequest', "file_path" => "app/Http/Requests", "namespace" => "App\\Http\\Requests", "methods" => [ "list", "show", "store", "update", "delete" ], "rewrite" => false ]`**resource**Indicates the default configuration for resource filesarray`[ "use" => [], "traits" => [], "interfaces" => [], "extends" => 'Illuminate\\Http\\Resources\\Json\\JsonResource', "file_path" => "app/Http/Resources", "namespace" => "App\\Http\\Resources", "rewrite" => false ]`**service**Indicates the default configuration for service filesarray`[ "use" => [], "traits" => [], "interfaces" => [], "extends" => null, "file_path" => "app/Services", "namespace" => "App\\Services", "methods" => [ "list", "fetch", "store", "update", "delete" ], "rewrite" => false ]`**migration**Indicates the default configuration for migration filesarray`[ "use" => [ 'Illuminate\\Database\\Schema\\Blueprint', 'Illuminate\\Support\\Facades\\Schema' ], "traits" => [], "interfaces" => [], "extends" => "Illuminate\\Database\\Migrations\\Migration", "file_path" => "database/migrations", "namespace" => null, "timestamps" => true, "softDeletes" => true, "id" => true, "rewrite" => false ]`**factory**Indicates the default configuration for factory filesarray`[ "use" => [ 'Illuminate\\Support\\Str' ], "traits" => [], "interfaces" => [], "extends" => 'Illuminate\\Database\\Eloquent\\Factories\\Factory', "file_path" => "database/factories", "namespace" => "Database\\Factories", "rewrite" => false ]`**mock**Indicates the default configuration for mock seeder filesarray`[ "use" => [], "traits" => [], "interfaces" => [], "extends" => 'Illuminate\\Database\\Seeder', "file_path" => "database/seeders/mocks", "namespace" => "Database\\Seeders\\Mocks", "count" => 50, "rewrite" => false ]`**test**Indicates the default configuration for test filesarray`[ "use" => [ 'Illuminate\\Foundation\\Testing\\WithFaker' ], "traits" => [ 'Illuminate\\Foundation\\Testing\\RefreshDatabase' ], "interfaces" => [], "extends" => 'Tests\\TestCase', "file_path" => "tests/Feature", "namespace" => "Tests\\Feature", "rewrite" => false ]`---

Configuration of laravel-crud-generator.json
--------------------------------------------

[](#configuration-of-laravel-crud-generatorjson)

As you may see, this file comes with an example. The hierarchy of the file is this:

> Entity

> > Enetity general configuration attributes

> > File

> > > File attributes configuration

---

General Attributes
------------------

[](#general-attributes)

AttributeDescriptionTypeExample**nameSingular**Indicates the singular name of the entitystring (optional)`"product"`**namePlural**Indicates the plural name of the entitystring (optional)`"products"`**rewrite**Indicates if the files of the entity should be rewrittenboolean (optional)`false`**files**Indicates what files of the entity should be createdarray (optional)`[ "routes", "model", "controller" ]`**attributes**Indicates the attributes of the entityobject of objects (optional)`"title": { "type": "string", "nullable": false, "unique": true, "default": "Default Test Product" }, "description": { "type": "text", "nullable": true, "unique": false }, "category_id": { "type": "bigInteger", "nullable": false, "unique": false }`**relations**Indicates the relationships of the entityobject of objects (optional)`"belongsTo": { "Brand" : {}, "ProductCategory": { "related": "App\\Models\\Products\\ProductCategory", "foreingKey": "category_id", "localKey": "idcategory", "relation": "product_category_relation_name" } }, "hasOne": { "Post":{ "related": "App\\Models\\Posts\\Post", "foreingKey": "product_id", "localKey": "id" } }`**files**Indicates what files of the entity should be createdarray (optional)`[ "routes", "model", "controller" ]`**routes**Indicates the attributes for routes file of the entityobject (optional)--**model**Indicates the attributes for model file of the entityobject (optional)--**controller**Indicates the attributes for controller file of the entityobject (optional)--**request**Indicates the attributes for request file of the entityobject (optional)--**resource**Indicates the attributes for resource file of the entityobject (optional)--**service**Indicates the attributes for service file of the entityobject (optional)--**migration**Indicates the attributes for migration file of the entityobject (optional)--**factory**Indicates the attributes for factory file of the entityobject (optional)--**mock**Indicates the attributes for mock seeder file of the entityobject (optional)--**test**Indicates the attributes for test file of the entityobject (optional)-----

### Type of Files

[](#type-of-files)

Right now, there are 10 types of files that can be generated:

- Routes
- Model
- Controller
- Request
- Resource
- Service
- Migration
- Factory
- Mock Seeder
- Test

### Routes

[](#routes)

AttributeDescriptionTypeExample**filePath**Indicates the path of the filestring (optional)`"routes/entities"`**use**Indicates the traits that should be included in this filearray of strings (optional)`[ "App\\Controllers\\SomeController", "App\\Controllers\\OtherController" ]`**rewrite**Indicates if the file should be rewritted if existboolean (optional)`false`### Model

[](#model)

AttributeDescriptionTypeExample**filePath**Indicates the path of the filestring (optional)`"app/Models/User"`**namespace**Indicates the namespace of the classstring (optional)`"App\\Models"`**classname**Indicates the name of the classstring (optional)`"User"`**table**Indicates the table of the modelstring (optional)`"users"`**primaryKey**Indicates the primary key of the modelstring (optional)`"user_id"`**traits**Indicates the traits that should be implemented in this classarray of strings (optional)`[ "Laravel\\Sanctum\\HasApiTokens", "Illuminate\\Notifications\\Notifiable" ]`**use**Indicates the traits that should be included in this classarray of strings (optional)`[ "Illuminate\\Support\\Str", "Faker\\Factory" ]`**interfaces**Indicates the interfaces that should implement this classarray of strings (optional)`[ "Illuminate\\Contracts\\Auth\\MustVerifyEmail" ]`**extends**Indicates the path of the extended classstring (optional)`"Illuminate\\Foundation\\Auth\\User as Authenticatable"`**rewrite**Indicates if the file should be rewritted if existboolean (optional)`false`### Controller

[](#controller)

AttributeDescriptionTypeExample**filePath**Indicates the path of the filestring (optional)`"app/Http/Controllers/UserController"`**namespace**Indicates the namespace of the classstring (optional)`"App\\Controllers"`**classname**Indicates the name of the classstring (optional)`"UserController"`**traits**Indicates the traits that should be implemented in this classarray of strings (optional)`[ "Illuminate\\Foundation\\Bus\\DispatchesJobs", "Illuminate\\Notifications\\Notifiable" ]`**use**Indicates the traits that should be included in this classarray of strings (optional)`[ "Illuminate\\Support\\Str", "Illuminate\\Http\\Request" ]`**interfaces**Indicates the interfaces that should implement this classarray of strings (optional)`[ "App\\Interfaces\\MustHaveCrud" ]`**extends**Indicates the path of the extended classstring (optional)`"Illuminate\\Routing\\Controller"`**rewrite**Indicates if the file should be rewritted if existboolean (optional)`false`**methods**Indicates the methods that should be implemented in this controller. You can add cannonical methods (**list**, **store**, **show**, **update**, **delete**, **restore**) or your own custom methods.array of strings (optional)`[ "list", "store", "delete", "someCustomMethod", "otherCustomMethod" ]`---

Usage
-----

[](#usage)

To generate files is neccesary to config the laravel-crud-generator.json file and then run "php artisan crud:generate" command.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

430d ago

### Community

Maintainers

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

---

Top Contributors

[![cheketo](https://avatars.githubusercontent.com/u/13419069?v=4)](https://github.com/cheketo "cheketo (18 commits)")

---

Tags

apilaravelgeneratorcrudfile generatorinnova-studio

### Embed Badge

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

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

PHPackages © 2026

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