Closed shone83 closed 5 years ago
This is my AddMembersEditRequest.php:
public function rules() { return [ 'name' => 'required', 'last_name' => 'required', 'social_number' => 'nullable|unique:add_members', 'telephone_1' => 'nullable|unique_with:add_members, name, last_name', 'street' => 'nullable|unique_with:add_members, name, last_name, number' ]; }
but when I want to update it gives me message: This combination of street, name, last name, number already exists.
this is update method in controller:
public function update(AddMembersEditRequest $request, $id) { $member = AddMember::findOrFail($id); $member->update($request->all()); $url = $request->only('redirects_to'); return redirect()->to($url['redirects_to']); }
how to ignore unique on update?
This is my AddMembersEditRequest.php:
but when I want to update it gives me message: This combination of street, name, last name, number already exists.
this is update method in controller:
how to ignore unique on update?