我对通知有其他想法。在将流程分配给用户时,它存储在数据库的流程日志表中,只是我只显示字段数据,但是在存储多个表时却遇到问题,而保存错误是
quote类型错误:传递给Illuminate \ Database \ Grammar :: parameterize()的参数1必须为数组类型,给定字符串,在/ opt / lampp / htdocs / process_flow_management / vendor / laravel / framework / src /中调用681行上的Illuminate / Database / Query / Grammars / Grammar.php
仅显示我的添加过程控制器
public function postdata(Manage_processRequest $request)
{
$manage_processes = new Manage_process([
'process_name' =>$request->get('process_name'),
'description' =>$request->get('description'),
'created_by' =>$request->get('created_by'),
'to_assign' =>$request->get('to_assign')
]);
$manage_processes->save();
$oid = Manage_process::latest('id')->get();
$emp=$request->get('emp');
$pid=$oid[0]->id;
if(isset($emp) && count($emp)) {
for($i=0;$i<count($emp);$i++)
{
$temp = explode(",",$emp[$i]);
$ecode=substr($temp[0],strpos($temp[0],"(")+1);
$process_employee = new Process_employee([
'emp' => $ecode,
'processid' => $pid
]);
$process_employee->save();
}
$plog = new Process_log([
'user_id' => $emp=$request->get('emp'),
'notfication_msg'=> $request->get('process_name'),
'status' => 'unread',
]);
$plog->save();
}
Session::flash('msg','Data Added successfully');
Session::flash('type','success');
return redirect('manage-process');
}