I have the following code in my controller:
public function send()
{
$name = Input::get('name');
$email = Input::get('email');
$subject = Input::get('subject');
$msg = Input::get('email');
Mail::send('emails.message', array(), function($message) use ($name, $email, $subject, $msg)
{
$message->to('nick@test.nl')->cc('bar@example.com');
return Response::json(array(
'status' => 'success'
));
});
}
And in I have a template "../views/emails/message.blade.php" where you'd expect it. The content of message.blade.php is:
test
And when I execute the send function I get the following error:
View [emails.message] not found.
I've searched for 2 hours now but couldn't find anything either in my code or on the web.
Note: I use the mandrill driver, which I have configured correctly (I think). Note 2: I know it looks silly, I have some data but use an empty array and pass along the data to the message function but don't use it. this is because I was trying to find the cause and removed some code along the way to exclude possibilities.
This answer is going to seem really silly but have you double checked spelling? For me, that's usually the case and the last thing I ever think to look at.
Not silly at all, but I have checked it and that can't be the problem. I even tried different files + the default email templates laravel came with.
I'm going to try a fresh install and see if the problem persist. In the mean time, any other suggestions are very welcome.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community