Please help me edit this function to codeigniter 4
public function makeQuery($minimum_price, $maximum_price, $brand, $ram, $storage){
$query = "SELECT * FROM product WHERE product_status = '1' ";
if(isset($minimum_price, $maximum_price) && !empty($minimum_price) && !empty($maximum_price))
{
$query .= "AND product_price BETWEEN '".$_POST["minimum_price"]."' AND '".$_POST["maximum_price"]."'";
}
if(isset($brand))
{
$brand_filter = implode("','", $brand);
$query .= "AND product_brand IN('".$brand_filter."')";
}
if(isset($ram))
{
$ram_filter = implode("','", $ram);
$query .= "AND product_ram IN('".$ram_filter."')";
}
if(isset($storage))
{
$storage_filter = implode("','", $storage);
$query .= "AND product_storage IN('".$storage_filter."')";
}
return $query;
}