title: How to convert sql query to laravel ORM query, INSERT IF NOT EXISTS
body: <pre><code>    public function update_tb_tokenidparc($token, $id_vendedor_pr, $id_corretora_pr, $id_parceiro){" INSERT INTO tb_tokenidparc 
      (nu_cdVendedor4E_tk1,nu_cdCorretoraS4E_tk,nu_IdParceiro_tk,cd_Codtokenidparc,status_token)
      SELECT * FROM (SELECT $id_vendedor_pr,$id_corretora_pr,$id_parceiro,$token,'1') AS tmp
      WHERE NOT EXISTS (
          SELECT * FROM tb_tokenidparc WHERE nu_cdVendedor4E_tk = $id_vendedor_pr and nu_cdCorretoraS4E_tk = $id_corretora_pr
          and nu_IdParceiro_tk = $id_parceiro and cd_Codtokenidparc = '.$token.') LIMIT 1)";
  </code></pre>
  
  <p>I have this Model and need to convert this to laravel orm</p>
  
  <p>The biggest problem is if not exist clause who i didn't found in laravel docs</p>
  
  <p>If have something like i apreciate</p>
  
  <p>i'm not looking for insert or create because this don't solve my problems</p>
  
  <p>Edit¹: The reason to convert is because i've an array to pass.</p>
  
  <p>Edit²: What i've already tried </p>
  
  <pre><code>public function insert_tb_tokenidparc($token, $id_vendedor_pr, $id_corretora_pr, $id_parceiro){
  
          DB::table('tb_tokenidparc')-&gt;firstOrCreate([
              'nu_cdVendedor4E_tk' =&gt; $id_vendedor_pr,
              'nu_cdCorretoraS4E_tk' =&gt; $id_corretora_pr,
              'nu_IdParceiro_tk' =&gt; $id_parceiro,
              'cd_Codtokenidparc' =&gt; $token,
              'status_token' =&gt; '1',
          ]);
  
      }
  </code></pre>