dev-master
9999999-devAdded a method to Laravel response for handling xml response and also converting Eloquent return to XML.
MIT
The Requires
- php >=5.5.9
- illuminate/support 5.x.x
laravel xml eloquent response
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML., (*1)
composer require php-monsters/laravel-xml-response
for Laravel < 5.6 add to config/app.php, (*2)
PhpMonsters\XmlResponse\XmlResponseServiceProvider::class
php artisan vendor:publish --provider="PhpMonsters\XmlResponse\XmlResponseServiceProvider"
// 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>); });
This component is developed by the following person(s) and a bunch of awesome contributors., (*3)
Aboozar Ghaffari |
The Laravel XML Response is open-sourced software licensed under the MIT license, (*4)
Added a method to Laravel response for handling xml response and also converting Eloquent return to XML.
MIT
laravel xml eloquent response