How do I use the COM library in Laravel?
I've got the following:
$connection = new COM("ADODB.Connection");
Class 'App\COM' not found
Your code is using the
App namespace; and there is no
COM class defined within the
App namespace. The standard PHP
COM class exists within the global namespace, so you need to specify that this is where the class should be found.
$connection = new \COM("ADODB.Connection");
\ tells PHP to look for the class in the global namespace