title: How to change Database in Validator in Laravel
body: <p>I want to Validate requested values from controller action by this way:</p>
  
  <pre><code>    // validate the info, create rules for the inputs
      $rules = array(
          'username'        =&gt; 'required|min:5|unique:users,username',
          'email'           =&gt; 'required|email|unique:users,email',
          'password'        =&gt; 'required|min:8',
      );
  
      // run the validation rules on the inputs from the form
      $validator = Validator::make(Input::all(), $rules);
  </code></pre>
  
  <p>All is fine if I'm using the <strong>default</strong> database, but for this Validation I need to check the tables in other database. In config I have two databases:</p>
  
  <pre><code>    'connections' =&gt; array(
  
      'main' =&gt; array(
          'driver'    =&gt; 'mysql',
          'host'      =&gt; '*******',
          'database'  =&gt; '*******',
          'username'  =&gt; '*******',
          'password'  =&gt; '*******',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_general_ci',
          'prefix'    =&gt; 'ko_',
      ),
  
      'server_auth' =&gt; array(
          'driver'    =&gt; 'mysql',
          'host'      =&gt; '*******',
          'database'  =&gt; '*******',
          'username'  =&gt; '*******',
          'password'  =&gt; '*******',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_general_ci',
          'prefix'    =&gt; '',
      ),
  ),
  </code></pre>
  
  <p>When I call the Validation, it is checking by "unique" rule in my default database so I need to change it, but I cannot found anywhere how to do this.</p>