vendredi 28 juin 2019

Invalid view. Send email - Laravel - 5.8

I am trying to send an email with Laravel. I have a view in folder: views/emails/user.blade.php with simple HTML.

I have created Mailable: php artisan make:mail UserEmail. In my Controller where I am sending email:

Mail::send($request->user())
    ->queue(new PropertyAsk());

Mailable:

public function build()
{
    return $this->from('some email')
                ->view('emails.user');
}

, but when I try it says:

"message": "Invalid view.",
"exception": "InvalidArgumentException",
"file": "...vendor/laravel/framework/src/Illuminate/Mail/Mailer.php",
"line": 310,

I am sure that I have that view. I can return it with some method controller.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire