I am using laravel 5.1. I want to use an XML parser, and I searched and found Orchestra as it is mostly used. Therefore, I examined in detail all the steps indicated in the documentation for installation and configuration. I added the Orchestra\Parser\XmlServiceProvider::class section to the providers in the config/app.php and the 'XmlParser' => Orchestra\Parser\Xml\Facade::class in aliases .
Now in my controller I added my namespace, for example use Orchestra\Parser\Xml\Facade; at the top of my controller. But when I try to use its function in my action, for example
$xml = XmlParser::load($xml_document);
It generates an error message,
Class 'App\Http\Controllers\XmlParser' not found
So, I want to know if there is another way in Laravel 5.1 use packages, and I am doing something wrong with Orchestra if someone used it.
source share