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

ActiveLibrary[API Development](/categories/api)

bhavingajjar/laravel-api-generator
==================================

a laravel rest api generator with API Resources

v3.0.4(2y ago)487.7k↓33.3%5MITPHPPHP ^7.2|^8.0|^8.1

Since May 25Pushed 2y ago4 watchersCompare

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

READMEChangelog (8)Dependencies (3)Versions (12)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/35769bf5b94e8b917222fcf62f16200f68bd7553a6306fac31c17c7212de3b01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62686176696e67616a6a61722f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bhavingajjar/laravel-api-generator)[![Build Status](https://camo.githubusercontent.com/8db6604b3f194b0928b1e56682832bc8a083cc3ad621ca6e33e9c56be4ab4a0e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62686176696e67616a6a61722f6c61726176656c2d6170692d67656e657261746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bhavingajjar/laravel-api-generator)[![Quality Score](https://camo.githubusercontent.com/9373608327dcb6369326c38b829e1620078ee82b3a1693f8027529e122ff2204/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62686176696e67616a6a61722f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/bhavingajjar/laravel-api-generator)[![Total Downloads](https://camo.githubusercontent.com/4f8448fed2bd004478de9e55f01aebece352c8439cf209e91107dcf2de29f380/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62686176696e67616a6a61722f6c61726176656c2d6170692d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bhavingajjar/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 bhavingajjar/laravel-api-generator
```

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

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="Bhavingajjar\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
```

### 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)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Bhavin Gajjar](https://github.com/bhavingajjar)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 87.7% 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 ~115 days

Recently: every ~207 days

Total

11

Last Release

1032d ago

Major Versions

v1.1.1 → v2.0.02020-05-27

2.x-dev → v3.0.02021-04-15

PHP version history (3 changes)v1.1.1PHP ^7.2

v3.0.0PHP ^7.2|^8.0

v3.0.3PHP ^7.2|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/96c11ba3a54d8a709c884c7ba64d9e15286147554b2864a46224ed3e2f7e0510?d=identicon)[bhavingajjar](/maintainers/bhavingajjar)

---

Top Contributors

[![bhavingajjar](https://avatars.githubusercontent.com/u/11258397?v=4)](https://github.com/bhavingajjar "bhavingajjar (50 commits)")[![dipeshtps](https://avatars.githubusercontent.com/u/32360745?v=4)](https://github.com/dipeshtps "dipeshtps (5 commits)")[![bhavingtps](https://avatars.githubusercontent.com/u/54806757?v=4)](https://github.com/bhavingtps "bhavingtps (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

api-generatorlaravel-apilaravel-api-generatorlaravel-api-resourceapi-generatorlaravel-api-generatorbhavingajjarlaravel-api-resources

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[larafast/fastapi

A Fast Laravel package to help you generate CRUD API Controllers and Resources, Model

1233.9k](/packages/larafast-fastapi)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[andreacivita/api-crud-generator

Simple API Crud generator for Laravel

131.2k](/packages/andreacivita-api-crud-generator)

PHPackages © 2026

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