title: laravel validation unique value in batch of columns
body: <p>I have table that have <code>role</code> column, i have to check and validate for every <code>type</code> need only one <code>manager</code>
  like this : </p>
  
  <pre><code>| id |   role | type | name 
  _______________________________
  | 1 | manager | 1    | Pedram 
  | 2 | member  | 1    | Parham
  | 3 | member  | 2    | Pedram 
  | 4 | member  | 1    | Parham
  </code></pre>
  
  <p>i have to do this with Laravel <code>unique:</code> validation. </p>
  
  <p>i wrote a custom validation and it works : </p>
  
  <pre><code>    public function validateUniqueValue($attribute, $value, $parameters)
  {
      $query = DB::table($parameters[0])-&gt;where($parameters[1], $value);
      if (array_key_exists(2, $parameters)) {
          $query-&gt;where($parameters[2], $parameters[3]);
      }
      if ($query-&gt;count() &gt; 0) {
          return false;
      }
      else {
          return true;
      }
  }
  </code></pre>
  
  <p>but, how can i do something like this ? </p>