# |
Jul 17th 2017, 08:02 |
alexdd55 |
wasn’t there a install wizard for cake? |
# |
Jul 17th 2017, 08:01 |
alexdd55 |
morning |
# |
Jul 17th 2017, 07:58 |
Guest97576 |
morning |
# |
Jul 17th 2017, 07:55 |
neon1024 |
Morning everyone |
# |
Jul 17th 2017, 07:51 |
savant |
a silly answer |
# |
Jul 17th 2017, 07:47 |
xuding |
a silly question, |
# |
Jul 17th 2017, 05:34 |
iqbalchannar796 |
https://gist.github.com/anonymous/ea72b0ad34ea5e4ea81fc79541c7560d |
# |
Jul 17th 2017, 05:27 |
iqbalchannar796 |
script src="https://gist.github.com/anonymous/ea72b0ad34ea5e4ea81fc79541c7560d.js"></script |
# |
Jul 17th 2017, 05:25 |
admad |
Aha, you already told him. Well then good luck wasting time by keeping on using persons |
# |
Jul 17th 2017, 05:25 |
jeremyharris |
Getting info piece by piece is taking too long for me :( I need to sleep |
# |
Jul 17th 2017, 05:24 |
jeremyharris |
https://cakesf.slack.com/archives/C053DPNGT/p1500267592756371 |
# |
Jul 17th 2017, 05:23 |
admad |
The plural of person is people not persons |
# |
Jul 17th 2017, 05:23 |
jeremyharris |
Ok great. Now the users table please. And debug($person) right after patchEntity |
# |
Jul 17th 2017, 05:18 |
iqbalchannar796 |
sure sir |
# |
Jul 17th 2017, 05:15 |
jeremyharris |
Please paste your PersonsTable into http://gist.github.com |
# |
Jul 17th 2017, 05:13 |
slackebot |
} debug($user->errors()); $this->Flash->error(__('The user could not be saved. Please, try again.')); } |
# |
Jul 17th 2017, 05:13 |
iqbalchannar796 |
$user = $this->Users->newEntity(); if ($this->request->is('post')) { // pr($this->request->data); // die; $user = $this->Users->patchEntity($user, $this->request->data, ['associated' => ['Persons']]); if ($this->Users->save($user, ['associated' => ['Persons']])) { $this->Flash->success(__('The user has been saved.')); return $this->redirect(['action' |
# |
Jul 17th 2017, 05:12 |
iqbalchannar796 |
ERROR "Cannot marshal data for "Users" association. It is not associated with "Persons". " |
# |
Jul 17th 2017, 05:10 |
jeremyharris |
And the other things too please |
# |
Jul 17th 2017, 05:10 |
jeremyharris |
debug($person) |
# |
Jul 17th 2017, 05:09 |
jeremyharris |
gist.github.com |
# |
Jul 17th 2017, 05:09 |
iqbalchannar796 |
how Jeremyharris ?? |
# |
Jul 17th 2017, 05:03 |
jeremyharris |
Can you gist the Persons table and the request data and the $person entity after patching |
# |
Jul 17th 2017, 05:02 |
iqbalchannar796 |
i want to use add function of UsersController for storing association data |
# |
Jul 17th 2017, 05:01 |
iqbalchannar796 |
yes |
# |
Jul 17th 2017, 04:59 |
jeremyharris |
Also, since you're not following conventions there might be more setup (the plural of person is people) |
# |
Jul 17th 2017, 04:59 |
jeremyharris |
https://book.cakephp.org/3.0/en/orm/associations.html |
# |
Jul 17th 2017, 04:57 |
jeremyharris |
Did you add the association on the table's initialize method? |
# |
Jul 17th 2017, 04:39 |
iqbalchannar796 |
??? |
# |
Jul 17th 2017, 04:39 |
iqbalchannar796 |
can anyone help me |
# |
Jul 17th 2017, 04:39 |
iqbalchannar796 |
3.3.15 |
# |
Jul 17th 2017, 04:38 |
iqbalchannar796 |
i am using cakephp 3.3 |
# |
Jul 17th 2017, 04:36 |
slackebot |
($this->Persons->save($person, ['associated' => ['Users']])) { // $user = $this->Users->patchEntity($user, $this->request->data); // if ($this->Users->save($user)) { $this->Flash->success(__('The user has been saved.')); return $this->redirect(['action' => 'index']); } debug($person->errors()); $this->Flash->error(__('The user could not be saved. Please, try ag |
# |
Jul 17th 2017, 04:36 |
slackebot |
} $this->set(compact('person')); $this->set('_serialize', ['person']); } |
# |
Jul 17th 2017, 04:36 |
slackebot |
not work ERROR "Cannot marshal data for "Users" association. It is not associated with "Persons". " public function add() { $this->loadModel('Persons'); $person = $this->Persons->newEntity(); if ($this->request->is('post')) { // pr($this->request->data); // die; $person = $this->Persons->patchEntity($person, $this->request->data, ['associated' => ['Users']]); if |
# |
Jul 17th 2017, 04:36 |
iqbalchannar796 |
i have two tables 1-Persons 2-Users Structure of PERSONS table id first_name second_name email address created modified ................ Structure of USERS table id person_id username password role_id created modified ...................... My Question is that how can i store data from UsersController with Association ?????? My Add function in UsersController is that i have modified according to require |
# |
Jul 17th 2017, 04:35 |
iqbalchannar796 |
hi |
# |
Jul 17th 2017, 03:03 |
braeden |
session_start(); $_SESSION[ 'blah' ] = true; etc. |
# |
Jul 17th 2017, 03:03 |
braeden |
are sessions working outside of CakePHP? |
# |
Jul 17th 2017, 03:03 |
braeden |
Hmm not sure what the problem is, kinda hard to diagnose |
# |
Jul 17th 2017, 02:17 |
banna |
@braeden http://dev.casaparticulares.net/ hit the url and you will see |