$table->unique(['mytext', 'user_id']);
'mobile_no'
=> 'unique:users,mobile_no,NULL,id,country_id,'.request('country_id');
'name' => 'required|max:150|unique:course_lessons,name,NULL,id,course_id,' . request('course_id'),
"<input_filed_name>" => "valiadtionRule"|"ValidationRule"|"unique:<tableName>,<validateableField>,<ignoreableID>,<tablePrimaryKey>,<column1>,<column1Value>,<column2>,<column2Value>"
public function rules()
{
return [
'column_1' => 'required|unique:TableName,column_1,' . $this->id . ',id,colum_2,' . $this->column_2 . ',colum_3,' . $this->column_3,
];
}
'exam_category_id' => Rule::unique('exams')->where(function ($query) use ($request) {
return $query->where('exam_name', $request->exam_name)
->where('exam_year', $request->exam_year)
->where('student_id', $request->student_id);
})