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

ActiveLibrary[API Development](/categories/api)

giangmv/laravel-api-generator
=============================

a laravel rest api generator with API Resources

035[1 PRs](https://github.com/hoanggiang333889/laravel-api-generator/pulls)PHP

Since Mar 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hoanggiang333889/laravel-api-generator)[ Packagist](https://packagist.org/packages/giangmv/laravel-api-generator)[ RSS](/packages/giangmv-laravel-api-generator/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel API Generator With Resources
====================================

[](#laravel-api-generator-with-resources)

[![Latest Version on Packagist](https://camo.githubusercontent.com/05254c5141509fd66057ba676a962d0bd6ec4e849ed246cae3cd2077b2491164/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4769616e676d762f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Giangmv/laravel-api-generator)[![Build Status](https://camo.githubusercontent.com/ead9b2a2884f898281d1c8f5dc4a0a7e4a2c2b49ad5af61a6628e8e9d8f55951/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4769616e676d762f6c61726176656c2d6170692d67656e657261746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Giangmv/laravel-api-generator)[![Quality Score](https://camo.githubusercontent.com/b00176abe0614061a1a2158c428861e8cf5aedb3e43fdce43dee8ac1c75f2bc6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4769616e676d762f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Giangmv/laravel-api-generator)[![Total Downloads](https://camo.githubusercontent.com/6f2aa81168c15f686c2d3dc6bea6aa7938bbea6252953ef836556d67426e5330/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4769616e676d762f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Giangmv/laravel-api-generator)[![StyleCI](https://camo.githubusercontent.com/915f024046da2ff83d56b8bd465c2a5abbaaad587031a79c237449a44cccd9fb/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231383832383131352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/218828115)

This package is used to generate laravel api with Resources

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

[](#installation)

You can install the package via composer:

```
composer require Giangmv/laravel-api-generator
```

Publish Configuration File
--------------------------

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Giangmv\LaravelApiGenerator\Providers\RepositoryServiceProvider" --tag="repository-config"

php artisan vendor:publish --provider="Giangmv\LaravelApiGenerator\LaravelApiGeneratorServiceProvider" --tag="config"

Next, if you plan for cross origin support, you should add middleware to your api middleware group within your app/Http/Kernel.php file:
'ApiHeaderInject'

add in env
for allow cross origin support
API_ALLOW_CROSS_ORIGIN = true
for json content type
API_JSON_RESPONSE = true
```

Usage
-----

[](#usage)

```
php artisan api:generate --model=User --module=Users
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

Credits
-------

[](#credits)

- [giangmv](https://github.com/Giangmv)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 91.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![hoanggiang333889](https://avatars.githubusercontent.com/u/38598737?v=4)](https://github.com/hoanggiang333889 "hoanggiang333889 (21 commits)")[![giangmv994](https://avatars.githubusercontent.com/u/103614807?v=4)](https://github.com/giangmv994 "giangmv994 (1 commits)")[![vthuong170599](https://avatars.githubusercontent.com/u/77565000?v=4)](https://github.com/vthuong170599 "vthuong170599 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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