Laravel: Validation unique on update
问题 I know this question has been asked many times before but no one explains how to get the id when you're validating in the model. 'email' => 'unique:users,email_address,10' My validation rule is in the model so how do I pass the ID of the record to the validation rule. Here is my models/User protected $rules_update = [ 'email_address' => 'required|email|unique:users,email_address,'.$id, 'first_name' => "required", 'last_name' => "required", 'password' => "required|min:6|same:password_confirm",