nova-mail
nova-mail copied to clipboard
get variables from model eloquent
It would be nice to be able to insert placeholders that are not columns, like an eloquent model.
I've just managed to get what I wanted in src/mail/send.php changed the following line and added "with" to my eloquent relationship and it worked
return $this->markdown('nova-mail::' . $this->filename(), $this->model->with('listing')->first()->toArray());
In the markdown editor just added {{ $listing['name'] }}
Thank you and hope this helps.