title: Laravel: how to check if input value exists in table
body: <p>I am saving data to a table with following store method. </p>
  
  <pre><code>public function store(Request $request)
      {
          foreach ($request-&gt;admin_id as $key=&gt;$val){
              $adminbillings = AdminBilling::create([
                  'month' =&gt; $request-&gt;month,
                  'rate' =&gt; $request-&gt;rate[$key],
                  'admin_id' =&gt; $val,
              ]);          
          }
  
          return redirect('/');
      }
  </code></pre>
  
  <p>Now, I want to check if any of the input values is already existed in the table before storing them. If a row in the table already contains all 3 same inputs, it should do nothing, otherwise store the inputs. It would be something like</p>
  
  <pre><code>if  
      $requested-&gt;month     does not exist in month     column || 
      $requested-&gt;rate      does not exist in rate      column || 
      $requested-&gt;admin_id  does not exist in admin_id  column 
  then 
      save
  </code></pre>
  
  <p>Please help me. I am using Laravel 5.4.</p>
  
  <p>Thank you</p>