Commit a95dafc9 by Teeradone-PIM

teeradone edit

parent 5f361851
...@@ -8,13 +8,13 @@ use Cake\Http\Client; ...@@ -8,13 +8,13 @@ use Cake\Http\Client;
class ProfilesController extends AppController class ProfilesController extends AppController
{ {
public function index($id = 13112){ public function index(){
$this->viewBuilder()->layout('blank'); $this->viewBuilder()->layout('blank');
/*******************************/ /*******************************/
$id = $this->Auth->user('id'); $id = $this->Auth->user('id');
$this->loadModel('Users'); $this->loadModel('Users');
$responseUserProfile = $this->Users->get($id, [ $responseUserProfile = $this->Users->get($id, [
...@@ -47,8 +47,8 @@ class ProfilesController extends AppController ...@@ -47,8 +47,8 @@ class ProfilesController extends AppController
'keyField' => 'id', 'keyField' => 'id',
'valueField' => 'province_name_th' 'valueField' => 'province_name_th'
]) ])
->where(['master_country_id =' => $responseUserPersonal['master_country_id']]) ->where(['master_country_id =' => $responseUserPersonal['master_country_id']])
->order(['province_name_th']); ->order(['province_name_th']);
// pr($Province);die; // pr($Province);die;
if(!empty($Province)) $Province = $Province->toArray(); if(!empty($Province)) $Province = $Province->toArray();
...@@ -56,6 +56,8 @@ class ProfilesController extends AppController ...@@ -56,6 +56,8 @@ class ProfilesController extends AppController
$dateNow = $res->i18nFormat('dd/MM/yyyy'); $dateNow = $res->i18nFormat('dd/MM/yyyy');
if ($this->request->is(['patch', 'post', 'put'])) { if ($this->request->is(['patch', 'post', 'put'])) {
// pr($this->request->data());die;
$data = $this->request->data; $data = $this->request->data;
// pr($this->request->data);die; // pr($this->request->data);die;
......
...@@ -117,13 +117,12 @@ class UsersController extends AppController { ...@@ -117,13 +117,12 @@ class UsersController extends AppController {
'keyField' => 'id', 'keyField' => 'id',
'valueField' => 'province_name_th' 'valueField' => 'province_name_th'
] ]
); );
if(!empty($provinces)) $provinces = $provinces->toArray(); if(!empty($provinces)) $provinces = $provinces->toArray();
$this->set(compact('provinces','countries')); $this->set(compact('provinces','countries'));
$this->viewBuilder()->layout('blank'); $this->viewBuilder()->layout('blank');
} }
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
#Signup #Signup
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment