title: Laravel 5.5 unique validation rule on seperate table with different column name
body: <p>So I have users and companies. A user belongs to one company.</p>
  
  <p>I want to validate a user registration so that the <code>business_name</code> field they use to register is unique in the <code>companies</code> table, the goal is to not allow users from creating duplicate companies.</p>
  
  <p>Here is my register function:</p>
  
  <pre><code>public function register(Request $request)
      {
          $validator = Validator::make($request-&gt;all(), [
              'first_name' =&gt; 'required',
              'last_name' =&gt; 'required',
              'business_name' =&gt; 'required|unique:companies',
              'email' =&gt; 'required|email|max:255|unique:users',
              'password' =&gt; 'required|min:6',
          ]);
  
  
          if ($validator-&gt;fails()) {
              return response()-&gt;json(['error'=&gt;$validator-&gt;messages()], 401);
          }
  
  }
  </code></pre>
  
  <p>The field I want to compare against is the <code>companies.name</code> to check for uniqueness.</p>
  
  <p>Is this possible? At the moment it is trying to look for <code>business_name</code> in the <code>companies</code> table.</p>