This commit is contained in:
dev-chiefworks
2022-04-13 21:05:03 -04:00
parent 1db9e33ccd
commit c99d1d576d
2 changed files with 38 additions and 18 deletions
+18 -18
View File
@@ -6,25 +6,25 @@ class Home extends BaseController
{
public function index()
{
$endpoints = array(
'getdrycleanservicelist' => array('POST'),
'createuser' => array('POST'),
'userlogin' => array('POST'),
'updateprofile' => array('POST'),
'updsprofile' => array('POST'),
'newlundrypickup' => array('POST'),
'newdrycleanpickup' => array('POST'),
'confirmlundrypickup' => array('POST'),
'savecardpayment' => array('POST'),
'getlundrylocation' => array('POST'),
'getcardpaymentlist' => array('POST'),
'getmyservicelist' => array('POST'),
'getoneserviceitem' => array('POST'),
'loadprofile' => array('POST'),
'deletecard' => array('POST')
);
$db = \Config\Database::connect('db');
$data['endpoints'] = $endpoints;
$query = $db->query('SELECT id, bank_name FROM banks');
$results = $query->getResult();
foreach ($results as $row) {
echo $row->id;
echo $row->bank_name;
}
echo 'Total Results: ' . count($results);
$query = $this->db->get('banks');
$results = array();
foreach ($query->result() as $result) {
$results[] = $result;
}
var_dump( $results );
return view('welcome_message',$data);
}
}