Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 5, 2020 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/6ba6e6d13030648052bef87e9ad51a8e to your computer and use it in GitHub Desktop.
Save parzibyte/6ba6e6d13030648052bef87e9ad51a8e to your computer and use it in GitHub Desktop.
<?php
DB::table("ventas")
->join("productos_vendidos", "productos_vendidos.id_venta", "=", "ventas.id")
->where("ventas.created_at", ">=", $haceMeses)
->where("ventas.created_at", "<=", $hoy)
->where("ventas.id_cliente", "=", $idCliente)
->where("productos_vendidos.codigo_barras", "=", $codigoBarras)
->toSql();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment