10 months ago

Path to Mailables inside a package

Posted 10 months ago by nam_co

Hi, thanks in advance, Im trying to develop a local package, but Im not able to use the mailable file inside the package

Controller Head:

namespace Company\Subscription\Http\Controllers\Subscription;

use Illuminate\Support\Facades\Mail;

use Mail\PlanSuspend; (this path is actually vendor\company\subsccription\src\mail\PlanSuspend)

Controller function:

Mail::to('[email protected]')->queue((new PlanSuspend($user))->locale($user->lang??'en'));

with everything I try I get Class 'xxxx\PlanSuspend' not found

Can somebody please help me, what is the correct path? I prefer not to publish the mailables to keep it clean

Please sign in or create an account to participate in this conversation.