I'm trying to update multiple rows using this code:
PHP Code:
$directoryId = $this->request->getPostGet('directory_id');
$where = $this->request->getPostGet('media_ids');
var_dump($where);
var_dump($directoryId);
$result = $this->post->whereIn('id', $where)->update('parent', $directoryId);
essentially $where contains this:
PHP Code:
array(2) {
[0]=>
string(4) "1115"
[1]=>
string(4) "1116"
}
and $directoryId is: 1132
I get:
PHP Code:
Return value must be of type array, string returned