I have a multimodule project in which I want to use phpmailer. On each class of the phpmailer library I have added namespace on the first line as follows;
alongside the modules directories I have a plugins directory which contains the phpmailer classes. Am trying to access this classes within frontend module's controller.
This is what I have done;
In the Module.php
$loader->registerNamespaces( array( 'App\Frontend\Controllers' => __DIR__.'\controllers', 'App\Plugins\Mailer' => realpath(__DIR__.'\..\plugins\mailer'), ) );
accessing the class within a controller in the frontend module. new \App\Plugins\mailer\PHPMailer
Fatal error: Class 'App\Plugins\Mailer\PHPMailer' not found in...
I have a feeling the issue is on routing since I have counter checked my paths but am not very sure..
Any help much appreciated