public function postEdit($id) { $data = new coa(); $arrayEdit = $data->all_coa(); //print_r($arrayEdit[0]->coa_account); die; $arrayEdit[0]->coa_account = Input::get('coa_account'); $arrayEdit[0]->coa_code = Input::get('coa_code'); $arrayEdit[0]->coa_credit = Input::get('coa_credit'); $arrayEdit[0]->coa_debit = Input::get('coa_debit'); //$arrayEdit[0]->parent_id = Input::get('parent_id'); COA::where('coa_id', $id)->update(['coa_account' => $arrayEdit[0]->coa_account, 'coa_code' => $arrayEdit[0]->coa_code, 'coa_credit' => $arrayEdit[0]->coa_credit, 'coa_debit' => $arrayEdit[0]->coa_debit]); $data = new coa(); $arrayCOA = $data->all_coa(); return View('admin/accounts/show_coa', compact('arrayCOA')); }
public function child_coa() { $arrayCoa = COA::all(); //->where('parent_id','!=',0); return $arrayCoa; }