Commit 8b2e8dbc authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

attachments are now optional

parent 69476f8a
......@@ -65,7 +65,10 @@ class MailController extends Controller
}
$message = $request->input('message');
$subject = $request->input('subject');
$files = $request->file("attachments");
$files = [];
if($request->has("attachments") && is_array($request->file("attachments"))){
$files = $request->file("attachments");
}
Mail::to($mailto)
->send(new Kontakt($name, $replyTo, $subject, $message, $files));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment