How to Set Subject In Laravel Mail ?
Hi Guys,
In this tutorial,I will learn you how to set subject send email using markdown mailable class in laravel. you can simply set the subject in laravel mail.
Click to Mailable class Example
/laravel-6-send-mail-using-mailable-class/
Solution you can set build() method in mailable class example.
app/Mail/MyTestMail.php
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject('Your Subject')
->markdown('emails.myDemo')
->attach(public_path('pdf'), [
'as' => 'sample.pdf',
'mime' => 'application/pdf',
]);
}
It will help you....
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial