/** * Get the instance as an array. * * @return array */ public function toArray() { $array = $this->meta->toArray(); $array['file'] = $this->file->toArray(); $array['url'] = $this->url(); return $array; }
/** * Insert * * @param Meta $meta meta instance * @return null|Meta */ public function insert(Meta $meta) { $this->conn->table($this->table)->insert($meta->getAttributes()); return $this->find($meta->id); }