title: Laravel unique validation on multiple columns
body: <p>I have 2 columns in table servers.</p>
  
  <p>I have columns <code>ip</code> and <code>hostname</code>.</p>
  
  <p>I have validation:</p>
  
  <pre><code>'data.ip' =&gt; ['required', 'unique:servers,ip,'.$this-&gt;id]
  </code></pre>
  
  <p>This working only for column <code>ip</code>. But how to do that it would work and for column <code>hostname</code>? </p>
  
  <p>I want validate data.ip with columns <code>ip</code> and <code>hostname</code>.
  Because can be duplicates in columns ip and hostname, when user write ip.</p>