public function inlineUpdate($id) { $this->instance = $this->find($id); if (empty($this->instance)) { return false; } $data = $this->request->all(); $updated = false; if (method_exists($this->instance, 'getRepository')) { $repository = $this->instance->getRepository(); if (method_exists($repository, 'inlineSave')) { if ($repository->inlineSave($data)) { $updated = true; } else { return false; } } } if ($updated == false) { $fillableFields = $this->instance->getFillable(); foreach ($data as $key => $value) { if (in_array($key, $fillableFields)) { $this->instance->{$key} = $value; } } if ($this->instance->update()) { $updated = true; } } return $updated; }