Я делаю это на странице контактов на Laravel 5.6 и сталкиваюсь с ошибкой 'address' => $ recipient-> email,
Мой контактКонтроллер
public function store(ContactFormRequest $request)
{
$contact = [];
$contact['name'] = $request->get('name');
$contact['email'] = $request->get('email');
$contact['msg'] = $request->get('msg');
Mail::to(config('mail.support.address'))->send(new ContactEmail($contact));
flash('Your message has been sent!')->success();
return redirect()->route('contact.create');
}
Мой контактEmail
public function __construct($contact)
{
$this->contact = $contact;
}
public function build()
{
return $this
->to(config('mail.support.address'))
->subject('HackerPair Inquiry')
->view('emails.contact');
}