lararest / restapi-generator
一个用于使用请求和资源生成Restful API的Laravel包
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
本包用于生成带有请求和资源的Laravel Restful API
安装
您可以通过Composer安装此包
composer require lararest/laravel-restapi-generator
发布配置文件
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
用法
php artisan api:gen --model=User
测试
composer test
贡献
请参阅CONTRIBUTING以获取详细信息。
安全
如果您发现任何安全问题,请通过电子邮件aymannagy.ahmed@gmail.com联系,而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。