New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

flowgistics/laravel-xml

89,749 16
Install
composer require flowgistics/laravel-xml
Latest Version:1.2.0
PHP:^8.0
Laravel:8 – 12
License:MIT
Last Updated:Mar 28, 2025
Links: GitHub  ·  Packagist
Maintainer: AmandoVledder

Laravel XML made easy!

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package handles importing and exporting XML data from your Laravel application.

The main features are

  • Fast XML importing with the ability to cast to classes and models
  • XML exporting from (nested / value only ) arrays
  • Exporting Laravel views to XML

Installation

You can install the package via composer:

composer require flowgistics/laravel-xml

Usage

This packages comes with a facade which you can use like this \XML:: or use it in your class like use XML;

In depth guides can be found here:

$notes = XML::import("notes.xml")
    ->cast('note')->to(NoteModel::class)
    ->expect('note')->as('array')
    ->optimize('camelcase')
    ->get();

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

laravie/parser

XML Document Parser for PHP

2,258,770 230
spatie/array-to-xml

Convert an array to xml

74,468,608 1,198
haruncpi/laravel-log-reader

A simple and beautiful laravel log reader

374,346 379
idevman/xml-mapper

Used to map XMLs to mapped arrays

1,542 1
mtownsend/xml-to-array

Easily convert valid xml to a php array.

4,842,140 116

Version History

Version Released PHP Laravel License
1.2.0 ^8.0 >=8.47 MIT
1.1.1 ^8.0 >=8.47 MIT
1.1.0 ^8.0 >=8.47 MIT
1.0.0 ^8.0 >=8.47 MIT