Laravel Mailing Issue "Object of class Illuminate\Mail\Message could not be conv...
I'm trying to send a simple email. I know the issue is with my view but I don't know what I'm doing wrong.
Here is my controller:
$user = Auth::user()->fullname;
$id = Auth::user()->id;
$data = array(
'title' => Input::get('title'),
'message' => Input::get('message'),
'user' => $user,
'id' => $id
);
Mail::send('emails.PlainMessage', $data, function($message)
{
$message->to('amilajack@gmail.com', 'ECULTURE')->subject('User has a comment/question');
});
and here is my email view:
From: {{ $user }}, {{ $id }}
<br>
Title: {{ $title }}
<br>
Message: {{ $message }}
Thanks in advance!!!!
awsp
message
in your template.amilajack
awsp
$message
in email template is used by the instance itself and it is useful for attaching attachment in the template.Illuminate\Mail\Message
as string which it will certainly throw out an error when you do so.alf13