Muasx
Muasx

Reputation: 65

Laravel update role unique field in unique key table

I have a table 'employee' with no id, as Primary Key I use column kode. I want to update phone (unique) with larval unique role:

'phone'   => 'required|numeric|digits_between:8,14|unique:employee,phone,' . $kode

when I tested it shows error unknown column id

please help, thanks!

Upvotes: 0

Views: 197

Answers (1)

Muasx
Muasx

Reputation: 65

it solved. I just did this:

'phone'   => 'required|numeric|digits_between:8,14|unique:employee,phone,' . $kode.', kode'

Upvotes: 1

Related Questions