I have table named keywords as below
id keyword syntax description
I have a form that is used to edit KEYWORD details, i have the same validation rules on this form as i do on the create form as well as the database.
Basically the keyword has to be unique, but when updating if i just want to update the keywords details then it will fail and warn me that keyword already exists, so i cannot update the keyowords as their keyword has not been changed and thus throwing the database unique rule at me.
MY model class
public static $rules = array(
'keyword' => 'required|unique:keywords',
'syntax'=>'required',
'description'=>'required'
);