I have this rule for my members table
public function rules()
{
return [
'name'=>'required | max:30',
'lastname'=>'required | max:50',
'code'=> "numeric|unique:members,code,$this->id"
];
}
when I want update name or lastname I get this error
The code has already been taken.
where is my mistake, thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire