PHPackages                             devs-poetadigital/laravel-api-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. devs-poetadigital/laravel-api-generator

ActiveLibrary[API Development](/categories/api)

devs-poetadigital/laravel-api-generator
=======================================

code generator

0.3.0(3y ago)02.8k↓100%2MITPHPPHP ^7.2 || ^8.0

Since Mar 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/devs-poetadigital/laravel-api-generator)[ Packagist](https://packagist.org/packages/devs-poetadigital/laravel-api-generator)[ Docs](https://github.com/devs-poetadigital/laravel-api-generator)[ RSS](/packages/devs-poetadigital-laravel-api-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (30)Used By (0)

code\_generator\_php/code\_generator
====================================

[](#code_generator_phpcode_generator)

code generator

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

[](#installation)

Install this package as a dependency using [Composer](https://getcomposer.org).

```
"require": {
        "devs-poetadigital/laravel-api-generator": "0.1.6"
    }
composer install
or
composer require devs-poetadigital/laravel-api-generator
```

Generate code CRUD api with api:crud
------------------------------------

[](#generate-code-crud-api-with-apicrud)

After cloning this repository locally, execute the following commands to create a CRUD for model:

```
php artisan api:crud {{ model_name }} {{ action_name }} --only={{ your_action }}
```

*model\_name* : the model which you want to generate code

*action\_name(optional)*: your custom action you want to generate eg: CreateWithAdminRole

*your\_action*: it are belong in c(Create), r(Read), u(Update), d(Delete), s(Search)

eg: php artisan api:cruds Post GetAll --only=cu

Now, you are ready to develop!

Remove code with api:remove
---------------------------

[](#remove-code-with-apiremove)

After cloning this repository locally, execute the following commands to create a CRUD for model:

```
php artisan api:remove {{ model_name }} {{ action_name }} --only={{ your_action }}
```

*model\_name* : the model which you want to generate code

*action\_name*: your custom action you want to generate eg: CreateWithAdminRole

*your\_action*: it are belong in c(Create), r(Read), u(Update), d(Delete), s(Search)

eg: php artisan api:remove Post GetAll --only=cu

Now, you are ready to develop!

Refresh Swagger for Model Dto
-----------------------------

[](#refresh-swagger-for-model-dto)

```
php artisan api:swagger {{ class_name_dto }}
```

*class\_name\_dto* : the class you want to refresh

eg: php artisan api:swagger CreatePostResponseDto

Regenerate Model Dto
--------------------

[](#regenerate-model-dto)

```
php artisan api:dto {{ model_name }} {{ action_name }}
```

*model\_name* : the model which you want to generate code

*action\_name(optional)*: your custom action you want to generate eg: CreateWithAdminRole

eg: php artisan api:dto User Create

Create a service api by model name and action name
--------------------------------------------------

[](#create-a-service-api-by-model-name-and-action-name)

After cloning this repository locally, execute the following commands to create a servive api for model:

```
php artisan api:service {{ model_name }} {{ action_name }} {{ --query }}
```

*model\_name* : the model which you want to generate code

*action\_name(optional)*: your custom action you want to generate eg: CreateWithAdminRole

*--query*: it support generate code with sql command

eg: php artisan api:make Post search --query

Copyright and License
---------------------

[](#copyright-and-license)

The devs-poetadigital/laravel-api-generator library is free and unencumbered software released into the public domain. Please see [MIT](MIT) for more information.

About us
--------

[](#about-us)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.2% 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 ~28 days

Recently: every ~125 days

Total

29

Last Release

1098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea9ba568c3f46c600895741135869cc8e7342849cbf83eb51d084bbf8359df01?d=identicon)[devs-poetadigital](/maintainers/devs-poetadigital)

---

Top Contributors

[![nmkhanhit](https://avatars.githubusercontent.com/u/79307675?v=4)](https://github.com/nmkhanhit "nmkhanhit (43 commits)")[![khanhpoeta](https://avatars.githubusercontent.com/u/47133252?v=4)](https://github.com/khanhpoeta "khanhpoeta (15 commits)")[![devs-poetadigital](https://avatars.githubusercontent.com/u/79886051?v=4)](https://github.com/devs-poetadigital "devs-poetadigital (8 commits)")

---

Tags

phpapilaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devs-poetadigital-laravel-api-generator/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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