I'm running the following query:
$test_products = Product::where('metal_code', "=", "gold")->get();
That should be giving me one, single result, as my products table has one entry with a metal_code of "gold", but it's not. Any ideas?
Here's my model:
class Product extends Model
{
...
protected $fillable = ['name', 'user_id', 'brand_id', 'category_id', 'created_by', 'slug', 'price',
'is_metals_dev', 'metal_code', 'purchase_cost', 'percent_markup', 'last_price_update', 'barcode',
'video_provider', 'video_url', 'current_stock', 'minimum_order_quantity', 'is_approved', 'is_catalog',
'external_link', 'is_refundable', 'cash_on_delivery', 'attribute_sets','images', 'meta_image', 'colors',
'selected_variants', 'selected_variants_ids', 'contact_info','status'
];
...
}