api UPDATE

This commit is contained in:
2023-02-11 00:01:39 -05:00
parent fe9cf70282
commit 3eb200b256
6 changed files with 53 additions and 8 deletions
+6 -2
View File
@@ -18,12 +18,16 @@ class myfitHx extends Model
{
// $in['member_id'] = 16;
$member_id =
( isset($in['member_id']) && $in['member_id'] > 0 && is_int($in['member_id']) )
isset($in['member_id']) &&
$in['member_id'] > 0 &&
is_int($in['member_id'])
? $in['member_id']
: 0;
// $member_id = 13;
$sqlQ =
'SELECT * FROM members_login_hx WHERE member_id=' .
$member_id;
$member_id .
' ORDER BY id DESC LIMIT 15';
$query = $this->db->query($sqlQ);
$data['loginhx_data'] = $query->getResultArray();
return $inx = [
+5 -3
View File
@@ -17,14 +17,16 @@ class myfitResources extends Model
$ar = [
'id' => $i,
'description' => "This is the $i Desc $i",
'img1' => 'https://blog.mermsemr.com/wp-content/uploads/2021/01/COVID-19-vaccine_002.jpg',
'img1' =>
'https://blog.mermsemr.com/wp-content/uploads/2021/01/COVID-19-vaccine_002.jpg',
];
$dm[] = $ar;
}
return [
'resources' => $dm,
'category' => ['Blogs', 'Exercises', 'Videos'],
'resources' => ['blog'=>$dm],
'raw_data' => $in,
];
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class myfitUserProfile extends Model
{
protected $db;
public $con_name = 'mermsemr';
public function __construct()
{
parent::__construct();
$this->db = \Config\Database::connect($this->con_name);
}
public function accountResetPassword($in)
{
return ['msg' => 'Profile Information'];
}
public function getProfileInfo($in)
{
return ['msg' => 'Profile Information'];
}
}