Laravel 5.1 PHP DOMDocument() class not found
I'm using PHP's built-in DOMDocument() class to do some simple web-scrapping. However, it works on my 4.2 site, but not my 5.1 (both are on same installation of PHP).
Here's the error:
$list1 =new DOMDocument();
In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'.
$list1 =new \DOMDocument();