I'm trying to find something along the lines of insert_or_update (similar to what Laravel offers) in CodeIgniter 3. The closest I have found is $this->db->replace(), but I can't find anything that specifies that it can/can't be used alongside a ->where(). Based on the docs I don't believe this will work since it doesn't list ->where() as an option, but I wanted to double check this as well.
I'm hoping I can do something like...
$data = [...];
$whereSearch = [...];
$this->db->replace($data)->where($whereSearch);