laravel validation unique 2 both columns code example
Example 1: laravel unique multiple columns
$table->unique(['mytext', 'user_id']);
Example 2: unique check two clolumn in laravel validation
'data.ip' => ['required', 'unique:servers,ip,'.$this->id.',NULL,id,hostname,'.$request->input('hostname')]