title: Laravel Query with Joins issue
body: <p>In my laravel application, I have tables to store <code>user roles, users and inquiries</code></p>
  <p>I have three different user roles.</p>
  <pre><code>1/ user (role_id is 3)
  2/ regional_admin (role_id is 2)
  3/ admin (role_id is 1)
  </code></pre>
  <p>Regional admins only can access to the inquiries submitted by the same users from the same region.</p>
  <p>If a regional admin has access to an inquiry submitted from a different region user, it should display 419 error.</p>
  <p>I'm saving the user's region as, <code>region_id</code> in the <code>Users table</code></p>
  <p>So far I have the following in my inquiry controller's show method,</p>
  <pre><code>public function show($id)
  
      {
  
          if(!empty($id)){
  
          
          //$inquery = Inquery::find($id);
  
          $inquery = DB::table('users')
              -&gt;join('inqueries', 'users.id', '=', 'inqueries.user_id')
              -&gt;select('users.first_name as name','users.email as email', 'inqueries.*')
              -&gt;where('inqueries.id','=',$id)
              -&gt;first();
  
          //dd($inquery);   
  
              if(empty($inquery)){
                  
                  abort(404, 'Nothing Here');
              }
  
              else{
  
                  return view('admins.inqueries.show',compact('inquery'));
              }
  
          }
          
          else{
  
              abort(404, 'Nothing Here');
  
          }
  
      }
  </code></pre>
  <p>This way I can display all the inquiries but I'm struggling to restrict regional admins accessing to messages from other region users.</p>
  <p>My show inquiry URL looks like this,</p>
  <pre><code>http://test.site/admins/inqueries/1
  </code></pre>
  <p><code>1</code> is inquiry id</p>
  <p>Assume this has been submitted by user A who is from region 1, Then only regional admin(s) from region 1 and Super Admin should be able to access this...</p>
  <p>Any outside regional admin trying to access this, should be shown a 419 page.</p>
  <p>I tried doing this by matching auth user's region id to the inquiry sender's region id, But I'm unable to write the query according to that...</p>