$app->render(new u('msg')); } else { $app->view->setData('success', "1"); $app->view->setData('msg', "Successfully Bank Account Created"); $app->render(new u('msg')); } }); // confirm for expense $app->post('/create_expense_confirm', function () use($app) { $POST = $app->request()->post(); $bank = new bank(); $bank->form_post_values = $POST; $bank->saveExpense(); if ($bank->fails()) { $app->view->setData('error', "1"); $app->view->setData('msg', $bank->getError()); $app->render(new u('msg')); } else { $app->view->setData('success', "1"); $app->view->setData('msg', "Successfully Bank Expense Added"); $app->render(new u('msg')); } }); /************************************View details *************************************************/ //view for summary $app->get('/summary', function () use($app) { //$app->view->setData('form_action', BASEURL . "dashboard/bank/confirm"); $app->view->setData('page_title', "Bank Summary"); $app->render(new u('bank.summary')); }); //Show