public function to_json($load) { $carbon_data = parent::to_json(false); // Sends the menu_id to javascript $carbon_data = array_merge($carbon_data, array('menu_id' => $this->menu_id)); return $carbon_data; }