at Builder->insert('insert into feedback (name, email, subject, message, employess) values (?, ?, ?, ?, ?, ?)', array('errrrrrrrrrrrrrrrrrrrrrrr', 'some@gmail.com', 'GTA 5', 'qwdqwdqwqdqwdqwdqwdqwdqwdqw', 'rihasultanov@gmail.com')) in Builder.php line 1242
public function postContact(Request $request) {
$this->validate($request, [
'email' => 'required|email',
'subject' => 'min:3',
'message' => 'min:10',
'infoaboutsender' => 'min:6']);
$data = array(
'email' => $request->email,
'subject' => $request->subject,
'bodyMessage' => $request->message,
'infoaboutsender' => $request->infoaboutsender,
'emails' => $request->emails
);
Mail::send('includes.contactemail', $data, function($message) use ($data){
$message->from($data['email']);
foreach ($data['emails'] as $selectedOption)
{
$message->to($selectedOption);
$namebd = $data['infoaboutsender'];
$emailbd = $data['email'];
$subjectbd = $data['subject'];
$messagebd = $data['bodyMessage'];
$employeesbd = $selectedOption;
Feedback::insert('insert into feedback (name, email, subject, message, employess) values (?, ?, ?, ?, ?, ?)', [$namebd, $emailbd, $subjectbd, $messagebd, $employeesbd]);
}
$message->subject($data['subject']);
});
flash()->overlay(trans('routes.sended'), trans('routes.noticemassage'));
return redirect(trans('routes.langmain'));
}