/** * Applies the given where conditions to the model. * * @param array $where * @return void */ protected function applyConditions(array $where) { foreach ($where as $field => $value) { if (is_array($value)) { list($field, $condition, $val) = $value; $this->model = $this->model->where($field, $condition, $val); } else { $this->model = $this->model->where($field, '=', $value); } } }