Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2017 19:52
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 anonymous/a31b27c61fd5235261b61254b0b4ae3e to your computer and use it in GitHub Desktop.
Save anonymous/a31b27c61fd5235261b61254b0b4ae3e to your computer and use it in GitHub Desktop.
<?php
use DB;
class HomeController extends Controller {
public function cpus() {
$cpus = DB::select(`id`,`“cpu”`)
->from(`cpus`)
->whereRaw(`id NOT IN`, [], `( SELECT cpu_id FROM equipos )`)
->get()
->union(DB::select(`pantalla_id`) ->from(`equipos`) ->get());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment