你好我有这个代码。我想将此信息从数组发送到电子邮件页面。public function store(Request $request){ $equipment=new equipment(); $equipment -> name = request ('name'); $equipment -> email = request ('email'); $equipment -> department = request('department'); $equipment -> material= request('material'); $equipment -> finalidade = request('finalidade'); $equipment -> till = request('till'); $equipment -> until = request('until'); $equipment->save(); $data = [ 'name' => request ('name'), 'email' => request ('email'), 'department' => request ('department'), 'material' => request('material'), 'finalidade' => request('finalidade'), 'till' => request('till'), 'until' => request('until') ]; Mail::send('mail.newRequest',$data,function($m) use ($data){ $m->from('myemail@gmail.com','MECTS.SA'); $m->to('emaila@gmail.com'); $m->subject('Requisição do colaborador '.$data['name'].' do departamento de '.$data['department']); $m->cc($data['email']); }); return redirect()->route('thk');}这是我创建并传递数组的地方。现在这是我要显示数据的视图:<td style="padding:10px;font-size:14px; width:100%;"> <p>Nova requisição no sistema</p> <p>O Colaborador:$data['name']</p> <p><br /> Solicita: $data['material'] </p> <p> Por um período de:$data['till'] até:$data['untill']</p> <p><i>Best Regars!</i><br> <!-- /Callout Panel --> <!-- FOOTER --></td>来自数组的信息将不会显示(我喜欢O Colaborador:$data['name']),请帮忙。
- 1 回答
- 0 关注
- 105 浏览
添加回答
举报
0/150
提交
取消