因此,我的表单与字段有不同的别名。但是Laravel使用我的别名作为列名。我如何告诉laravel它只是一个别名,并提供另一个字段来代替它。
我的代码:
$rules = array(
'email1' => 'required|email|unique:users',
);
将其作为第二个参数提供。
$rules = array(
'email1' => 'required|email|unique:users,your_field_name',
);