php-monsters/laravel-xml-response
最新稳定版本:v6.0.1
Composer 安装命令:
composer require php-monsters/laravel-xml-response
包简介
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
README 文档
README
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
Composer Installation
composer require php-monsters/laravel-xml-response
Integration with Laravel 5.0+
for Laravel < 5.6 add to config/app.php
PhpMonsters\XmlResponse\XmlResponseServiceProvider::class
Publish
php artisan vendor:publish --provider="PhpMonsters\XmlResponse\XmlResponseServiceProvider"
Example
// basic usage with default config from xml.php file Route::get('/', function () { return response()->xml(User::all()); }); // custom template like: '<result></result>' Route::get('/foo', function () { return response()->xml(['foo' => 1, 'bar' => 2, 'baz' => 3], [], '<result></result>); });
Team
This component is developed by the following person(s) and a bunch of awesome contributors.
| Aboozar Ghaffari |
License
The Laravel XML Response is open-sourced software licensed under the MIT license
统计信息
- 总下载量: 99
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-11