I'm trying to send an email with Laravel (5.4) but still getting this error:
InvalidArgumentException in FileViewFinder.php line 137:
View [mails.forgot] not found.
at FileViewFinder->findInPaths('mails.forgot', array('{my app dir}/resources/views'))
in FileViewFinder.php line 79
at FileViewFinder->find('mails.forgot')
in Factory.php line 128
at Factory->make('mails.forgot', array('emailAddress' => null, 'connection' => null, 'queue' => null, 'delay' => null, 'message' => object(Message)))
in Mailer.php line 286
Added the file in resources/views/mails/forgot.blade.php
In the controller:
Mail::to('[email protected]')->send(new ForgotEmail());
In the mail file (Mail/ForgotEmail.php) I call:
return $this->view('mails.forgot');
For the rest of my app views are working correctly.
mails.forget
, like in a Route, such asRoute::get("/test", function(){ return view("mails.forgot"); });
, followed by navigating tomyapp.com/test
– Tim Lewisfunction
to mimic one. And yeah, if you can't return it manually, there's something else up, though, at a glance, I can't see it.mails.forgot
seems to be the right key to access it... – Tim Lewis