79413855

Date: 2025-02-05 06:50:56
Score: 1
Natty:
Report link

If you want to filter at the query level, use whereHas() to apply the condition directly to the database query.

$metaKey = '_manage_stock';

$filteredProducts = Product::whereHas('meta', function ($query) use ($metaKey) {
    $query->where('meta_key', $metaKey);
})->get();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Rahim