I am using laravel 5.2 framework but in this WhereBetween not working. I am using price range where price starts form 500 to 4000. When I execute the query get empty records but when I remove WhereBetween()
then get all records. Please suggest me how to solved this.
$query = Property::query();
$query->select('properties.property_id', 'properties.property_title', 'properties.description', 'properties.latitude', 'properties.longitude', 'properties.city_name', 'properties.state_name');
$query->leftjoin('properties_base_season_price_transactions', 'properties_base_season_price_transactions.parent_id', '=', 'properties.property_id');
$query->leftjoin('properties_availability', 'properties_availability.property_id', '=', 'properties.property_id');
$query->where('properties.property_category_id', $post_data['categoryid']);
$query->where('properties.property_sub_category_id', $post_data['subcategoryid']);
$query->where('properties.city_name', 'LIKE' , '%'.$post_data['city'].'%');
$query->whereBetween('properties_base_season_price_transactions.price', [500, 4444]);
$query_output = $query->get()->toArray();