You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am a bit confused as to what to do when I come to step 4: In the build method, use: $this->mjml('view.name');
When I generated the mail class, I cannot see any build method anywhere. When I try to add the build method, VSCode suggests a buildViewData method instead. I added the whole generated mail class below. Sorry if I have misunderstood something.
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Asahasrabuddhe\LaravelMJML\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class EmailVerificationMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the message envelope.
*
* @return \Illuminate\Mail\Mailables\Envelope
*/
public function envelope()
{
return new Envelope(
subject: 'Email Verification Mail',
);
}
/**
* Get the message content definition.
*
* @return \Illuminate\Mail\Mailables\Content
*/
public function content()
{
return new Content(
view: 'view.name',
);
}
/**
* Get the attachments for the message.
*
* @return array
*/
public function attachments()
{
return [];
}
}
The text was updated successfully, but these errors were encountered:
Hi. I am a bit confused as to what to do when I come to step 4: In the build method, use: $this->mjml('view.name');
When I generated the mail class, I cannot see any build method anywhere. When I try to add the build method, VSCode suggests a
buildViewData
method instead. I added the whole generated mail class below. Sorry if I have misunderstood something.The text was updated successfully, but these errors were encountered: