Laravel API Generator与资源 该软件包用于通过参考资料生成laravel api 安装 您可以通过composer安装该软件包: composer require bhavingajjar/laravel-api-generator 发布配置文件 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