public function createPastHistory($item) { $his = ItemHistory::newInstance(); $his->item_id = $item->id; $his->user_id = $item->user_id; $his->open_item_id = $item->open_item_id; $his->title = $item->title; $his->body = $item->body; $his->published = $item->published; $his->created_at = $item->created_at; $his->updated_at = $item->updated_at; $his->save(); return $his; }