Any idea how I can easily query the database using the query below and save the status into a variable?
Using something like whereHas() isn't the way to go I think.
$product = Product::find(3);
//just require a simple true or false
$productHasActiveSales =
($this->whereHas('orders', function ($query) {
$query->where('orders.created_at', '>=', Carbon::now()->subDays(3));
})) ? true : false;