bhavingajjar / laravel-api-generator
a laravel rest api generator with API Resources
Installs: 5 849
Dependents: 0
Suggesters: 0
Security: 0
Stars: 45
Watchers: 5
Forks: 4
Open Issues: 0
Requires
- php: ^7.2|^8.0|^8.1
- illuminate/support: 5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: 3.8.*
- phpunit/phpunit: ^9.5.10
README
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 gajjarbhavin22@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.