LaravelPackages.net
Acme Inc.
Toggle sidebar
bhavingajjar/laravel-api-generator

a laravel rest api generator with API Resources

8.038
48
v3.0.4
About bhavingajjar/laravel-api-generator

bhavingajjar/laravel-api-generator is a Laravel package for a laravel rest api generator with api resources. It currently has 48 GitHub stars and 8.038 downloads on Packagist (latest version v3.0.4). Install it with composer require bhavingajjar/laravel-api-generator. Discover more Laravel packages by bhavingajjar or browse all Laravel packages to compare alternatives.

Last updated

Laravel API Generator With Resources

Latest Version on Packagist Build Status Quality Score Total Downloads StyleCI

This package is used to generate laravel api with Resources

Installation

You can install the package via composer:

composer require bhavingajjar/laravel-api-generator

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

php artisan api:generate --model=User

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.

Star History Chart