Laravel Eloquent:SQL注入预防是自动完成的吗?
给定示例代码(Message是一个雄辩的模型):
public function submit(Request $request){
$this->validate($request, [
'name' => "required",
"email" => "required"
]);
//database connection
$message = new Message;
$message->name = $request->input("name");
$message->email = $request->input("email");
$message->save();
}
Eloquent是否使用参数化查询(如PDO)或任何其他机制来防止SQL注入?