mardi 3 mai 2016

How to define email subject in email template

I have email blade like this:

<?php
$title = 'title';
$text   = 'text';
?>

@include('emails.layouts.general')

In emails.layouts.general

<h1></h1>
<p></p>

I send email like :

$subject = 'some subject'

\Illuminate\Support\Facades\Mail::send($template, [],
    function ($m) {
    $m->to('test@test.com', 'test test')->subject($subject);
});

Does anybody have idea how I could define subject in blade :

<?php
$subject = 'subject';
$title   = 'title';
$text    = 'text';
?>

and set this subject when send email ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire