snowsoft / laravel-xml
v0.01
2023-03-09 09:48 UTC
Requires
- php: 8.*
- ext-dom: *
- ext-json: *
- ext-simplexml: *
- illuminate/support: >=8.47
Requires (Dev)
- orchestra/testbench: ^6.15
- phpunit/phpunit: ^9.3
- spatie/phpunit-snapshot-assertions: ^4.0
- vimeo/psalm: ^4.8
Suggests
- illuminate/view: Required to use the load view feature.
- laravel/laravel: Required to use the load view feature.
README
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 snowsoft/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.