1. Go to this page and download the library: Download krowinski/laravel-xslt library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
krowinski / laravel-xslt example snippets
Krowinski\LaravelXSLT\XSLTServiceProvider::class,
/**
* Show the application welcome screen to the user.
*
* @return Response
*/
public function index()
{
// adds to main xml /App attributte name template with value = hello
\View::addAttribute('name_template ', 'hello');
// create child template to /App with value hello and add aaa and zzz atribute to template.
\View::addChild('template', 'hello', false)->addAttribute('aaaa', 'zzz');
// creates parent example and adds childs foo and bar to it
\View::addArrayToXmlByChild(['foo', 'bar'], 'example', false);
// add to parent App child bar and zzz
\View::addArrayToXml(['bar', 'zzz'], false);
return view('welcome');
}