PHPackages                             lararest/restapi-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. lararest/restapi-generator

ActiveLibrary[API Development](/categories/api)

lararest/restapi-generator
==========================

A laravel package to generate Restful API with Requests &amp; Resources

v1.1.1(2y ago)013MITPHPPHP ^7.2|^8.0|^8.1|^8.3

Since Dec 5Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (4)Used By (0)

Laravel RESAPI Generator With Requests &amp; Resources
======================================================

[](#laravel-resapi-generator-with-requests--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 restful api with Requests &amp; Resources

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

[](#installation)

You can install the package via composer:

```
composer require lararest/laravel-restapi-generator
```

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

[](#publish-configuration-file)

```
php artisan vendor:publish --provider="lararest\\RestApiGenerator\RestApiGeneratorServiceProvider" --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:gen --model=User
```

### Testing

[](#testing)

```
composer test
```

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)

- [Ayman Nagy Ahmed](https://github.com/AymanNagyAhmed)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~1 days

Total

3

Last Release

894d ago

### Community

Maintainers

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

---

Top Contributors

[![AymanNagyAhmed](https://avatars.githubusercontent.com/u/59475537?v=4)](https://github.com/AymanNagyAhmed "AymanNagyAhmed (8 commits)")

---

Tags

api-generatorlaravel-api-resourcesLaravelRestaymannagyapiwithrequestrestapi-generatorlaravel-api-requestslaravelrest restapi generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lararest-restapi-generator/health.svg)

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

a laravel rest api generator with API Resources

487.7k](/packages/bhavingajjar-laravel-api-generator)[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)

PHPackages © 2026

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