Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Created June 28, 2017 22:35
Show Gist options
  • Save anthonybudd/e8bf1cf65583b96902e1ad79abd989dc to your computer and use it in GitHub Desktop.
Save anthonybudd/e8bf1cf65583b96902e1ad79abd989dc to your computer and use it in GitHub Desktop.
<?php
Product::insert([
'color' => 'blue',
'weight' => '100'
]);
Product::insert([
'color' => 'red',
'weight' => '100'
]);
Product::insert([
'color' => 'blue',
'weight' => '250'
]);
$products = Product::query()
->meta('color', 'blue')
->meta('weight', '>', 100, 'NUMERIC')
->execute();
dd($products);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment