I am using laravel 5.1. I want to use XML parser and I have searched and found Orchestra as mostly being used. So I have gone thorough all the steps given at documentation to install and configure. I have added
Orchestra\Parser\XmlServiceProvider::class
providers
config/app.php
'XmlParser' => Orchestra\Parser\Xml\Facade::class
aliases
use Orchestra\Parser\Xml\Facade;
$xml = XmlParser::load($xml_document);
Class 'App\Http\Controllers\XmlParser' not found
Laravel 5.1
Orchestra
Since the documentation already describe registration of the facade alias:
'XmlParser' => Orchestra\Parser\Xml\Facade::class,
You can either use \XmlParser::load()
, or import the alias.
use XmlParser;
or import the full namespace.
use Orchestra\Parser\Xml\Facade as XmlParser;