lararest / restapi-generator
A laravel package to generate Restful API with Requests & Resources
v1.1.1
2023-12-07 02:27 UTC
Requires
- php: ^7.2|^8.0|^8.1|^8.3
- illuminate/support: 5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0|^10.34.2
Requires (Dev)
- orchestra/testbench: 8.16.*
- phpunit/phpunit: ^10.1
README
This package is used to generate laravel restful api with Requests & Resources
Installation
You can install the package via composer:
composer require lararest/laravel-restapi-generator
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
php artisan api:gen --model=User
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email aymannagy.ahmed@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.