PHPackages                             dmsysop/laravel-response-xml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dmsysop/laravel-response-xml

ActiveLibrary[API Development](/categories/api)

dmsysop/laravel-response-xml
============================

Add the method xml integrating the laravel's response, converting eloquent return to XML.

023PHP

Since May 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dmsysop/laravel-response-xml)[ Packagist](https://packagist.org/packages/dmsysop/laravel-response-xml)[ RSS](/packages/dmsysop-laravel-response-xml/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Response XML
====================

[](#laravel-response-xml)

Add the method "xml" integrating the laravel's response, converting eloquent return to XML.

[![Total Downloads](https://camo.githubusercontent.com/303b65d87cd4010957b16cee5abb47539db368f943b742b543d24783a44c58e9/68747470733a2f2f706f7365722e707567782e6f72672f6a61696c746f6e73632f6c61726176656c2d726573706f6e73652d786d6c2f642f746f74616c2e737667)](https://packagist.org/packages/jailtonsc/laravel-response-xml)[![Latest Stable Version](https://camo.githubusercontent.com/d8e490fd312d6e10c6532a7dae9bf08b4a410b355214ad8bc81793d56e12a6d0/68747470733a2f2f706f7365722e707567782e6f72672f6a61696c746f6e73632f6c61726176656c2d726573706f6e73652d786d6c2f762f737461626c652e737667)](https://packagist.org/packages/jailtonsc/laravel-response-xml)[![Latest Unstable Version](https://camo.githubusercontent.com/60852383d98f8b07515ffb32d34eace098a354d0f4c4f4a144f7e42c7c3c2e81/68747470733a2f2f706f7365722e707567782e6f72672f6a61696c746f6e73632f6c61726176656c2d726573706f6e73652d786d6c2f762f756e737461626c652e737667)](https://packagist.org/packages/jailtonsc/laravel-response-xml)

### Composer Installation

[](#composer-installation)

```
composer require jailtonsc/laravel-response-xml
```

### Integration with Laravel 5.\*

[](#integration-with-laravel-5)

Add in config/app.php in place providers

```
XmlResponse\XmlResponseServiceProvider::class
```

Add in config/app.php in place aliases

```
'Xml' => XmlResponse\Facades\XmlFacade::class
```

### Publish

[](#publish)

```
php artisan vendor:publish
```

### Example

[](#example)

```
Route::get('/', function () {
    return response()->xml(User::all());
});
```

With status code

```
Route::get('/', function () {
    return response()->xml(User::all(), 404);
});
```

Setting by code

```
$config = [
        'template' => '',
        'rowName' => 'name'
    ];

Route::get('/', function () {
    return response()->xml(User::all(), 200, $config);
});
```

Return string xml

```
$xml = Xml::asXml(User::all());
```

Or

```
$config = [
        'template' => '',
        'rowName' => 'name'
    ];

$xml = Xml::asXml(User::all(), $config);
```

### Configuration

[](#configuration)

file config/xml.php

**template**: xml template.

**caseSensitive**: case sensitive xml tag.

**showEmptyField**: Show empty field.

**charset**: encoding.

**rowName**: line name if it is an array.

### License

[](#license)

The Laravel Response XML is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11683202?v=4)[Douglas M.](/maintainers/dmsysop)[@dmsysop](https://github.com/dmsysop)

---

Top Contributors

[![dmsysop](https://avatars.githubusercontent.com/u/11683202?v=4)](https://github.com/dmsysop "dmsysop (2 commits)")

### Embed Badge

![Health badge](/badges/dmsysop-laravel-response-xml/health.svg)

```
[![Health](https://phpackages.com/badges/dmsysop-laravel-response-xml/health.svg)](https://phpackages.com/packages/dmsysop-laravel-response-xml)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
