我无法发送带有用户地址的电子邮件作为FROM和回复
在FormRequest中:
public function persist()
{
$reservation = Resa::create(
$this->only(['nom', 'email', 'phone', 'formule', 'date_arr', 'date_ret', 'nb_adu', 'nb_enf', 'lemessage'])
);
Mail::to('contact@cotiga.fr')
->from($reservation->email, $reservation->nom)
->replyTo($reservation->email, $reservation->nom)
->send(new Reservation($reservation));
}
Run Code Online (Sandbox Code Playgroud)
我有错误:
FatalThrowableError in ReservationForm.php line 48:
Call to undefined method Illuminate\Mail\PendingMail::from()
Run Code Online (Sandbox Code Playgroud)
我尝试了充分的可能性,但我无法改变字段FROM和REPLYTO你能帮助我吗?谢谢