This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I am trying to make a Curl request and in routes.php the code works fine. However I have now placed it inside a public function called onSend() that sends some variables to run the request. However when I submit the form with some data I get this error.
Class 'Acme\MyPlugin\Components\DOMDocument' not found
and the line
$domd=@DOMDocument::loadHTML($html);
Is there anything I need to declare in the Components settings file?
Solved the issue, taken from this answer...
http://stackoverflow.com/questions/31577588/laravel-5-1-php-domdocument-class-not-found
"In Laravel 5.1 you must prefix the class name with the global namespace prefix '\'."
So I added a '\' to...
$domd=@\DOMDocument::loadHTML($html); $dom = new \DOMDocument();
and now works great :D
Last updated
1-2 of 2