例如,如何在下面的简单示例中添加异常$ id1和$ id2?
class SomeFormInputRequest extends Request
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
$id1 = 1;
$id2 = 2
return [
'email' => 'email|unique:users,email,' . $id1,
];
}
}