I'm using Laravel's Notifications system to send a welcome email when users register. Everything works great, except I can't for the life of me figure out how to insert a line break in the greeting.
This is my code:
namespace App\Notifications\Auth;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class UserRegistered extends Notification
{
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Welcome to website!')
->greeting('Welcome '. $notifiable->name .'!')
->line('## Sub heading line')
->line('Paragraph line')
->markdown('mail.welcome');
}
}
I want to put a break here ->greeting('Welcome '. $notifiable->name .'!') between the welcome and the name. Anyone know how I can do this? I've tried double space as described on markdown documentation. I've tried using nl2br(). I've tried \n. I've tried <br>. Nothing works.