# |
Apr 17th 2017, 05:12 |
nk-sonu |
is it cakephp 2 or 3 ? |
# |
Apr 17th 2017, 05:12 |
rchavik |
try contain('Contacts.StudentContacts') |
# |
Apr 17th 2017, 05:11 |
technofection |
I can do contain["Contacts"] in StudentsTable, but don't know how to get the relationship from the joining table (StudentContacts) :( |
# |
Apr 17th 2017, 05:09 |
technofection |
The problem is I don't how to contain the Relations table while fetching records with find() on Students Table |
# |
Apr 17th 2017, 05:08 |
technofection |
Yeah I did |
# |
Apr 17th 2017, 05:08 |
nk-sonu |
did you define relation in Model? |
# |
Apr 17th 2017, 05:08 |
technofection |
@nk-sonu But I don't know how to connect relation table further use belongsToMany "through" |
# |
Apr 17th 2017, 05:08 |
technofection |
@nk-sonu Yes, it does have it, student_id, contacts_id, relation_id |
# |
Apr 17th 2017, 05:05 |
nk-sonu |
can any one look at my htaccess issue |
# |
Apr 17th 2017, 05:03 |
nk-sonu |
then forget... he doesn't have patience i think... |
# |
Apr 17th 2017, 05:03 |
rchavik |
he left |
# |
Apr 17th 2017, 05:01 |
nk-sonu |
@rakesh: StudentContacts should have a relation between relation table.. |
# |
Apr 17th 2017, 04:36 |
rakesh |
Such a sleeping community ... |
# |
Apr 17th 2017, 04:36 |
rakesh |
Anyone there? |
# |
Apr 17th 2017, 04:28 |
rakesh |
I have 2 tables joined by a through table -> (Students, Contacts, StudentContacts). Now StudentContacts has a further foreignKey relation_id to Relations table. While fetching data, I need to fetch the relation as well. Any idea? |
# |
Apr 17th 2017, 04:26 |
rakesh |
Hi guys, I have a question regarding through belongsToMany joining.. Can anyone help me please |
# |
Apr 17th 2017, 04:24 |
rakesh |
Hi guys, I have a question regarding through belongsToMany joining.. Can anyone help me please |
# |
Apr 17th 2017, 04:23 |
rakesh |
Hi guys, I have a question regarding through belongsToMany joining.. Can anyone help me please |
# |
Apr 17th 2017, 03:53 |
rrueco |
how do I remove the form-group class of an input? |
# |
Apr 17th 2017, 03:45 |
aavrug |
How to write a method which will download the files directory from webroot in CakePHP-3, for single file I am using `$this->response->file` but I am not getting what to use for entire folder? |
# |
Apr 16th 2017, 21:36 |
damiano |
hmic, are you using something to work with authorizations ? |
# |
Apr 16th 2017, 21:31 |
damiano |
i am also using the authenticate plugin...the problem is that there is no plugin to work with authorizations |
# |
Apr 16th 2017, 21:30 |
damiano |
hmic, i really like middlewares :D i just have added them to an existing application |
# |
Apr 16th 2017, 21:29 |
damiano |
eheh |
# |
Apr 16th 2017, 21:29 |
damiano |
hmic, works |
# |
Apr 16th 2017, 21:27 |
hmic |
one of the main features of middlewares ;-) |
# |
Apr 16th 2017, 21:27 |
damiano |
hmic, oh it is simple...ok i try thanks! |
# |
Apr 16th 2017, 21:26 |
hmic |
damiano, from a middleware, just return the response, dont call next(). thats it. no exit()! |
# |
Apr 16th 2017, 21:19 |
damiano |
exit() seems not elegant there :D |
# |
Apr 16th 2017, 21:19 |
damiano |
(somethings like exiting with exit()) |
# |
Apr 16th 2017, 21:16 |
damiano |
i should check one parameter if exists i will add a cookie then stop |
# |
Apr 16th 2017, 21:16 |
damiano |
i am doing that into a middleware |
# |
Apr 16th 2017, 21:16 |
damiano |
hi guys how to return 200 on response without content (without calling the controller etc) |
# |
Apr 16th 2017, 19:42 |
joop |
whats the way to use deeper association in $this->Auth->user() like $this->Auth->user(Role.name)? |
# |
Apr 16th 2017, 19:01 |
Yuv |
Description or Descriptions? |
# |
Apr 16th 2017, 18:46 |
developer1211 |
$this->loadModel('Description'); $this->layout = "admin_layout"; $this->set('title_for_layout', "Edit Page"); //echo 'id'.$id; if (!$id) { throw new NotFoundException(__('Invalid content')); } $description = $this->Description->findById($id); pr($description); exit; if (!$description) { throw new NotFoundException(__('Invalid content') |
# |
Apr 16th 2017, 18:46 |
developer1211 |
can anyone highlight mistake in the code? |
# |
Apr 16th 2017, 18:46 |
developer1211 |
I have a simple problem in edit |
# |
Apr 16th 2017, 18:45 |
developer1211 |
Hello guys |
# |
Apr 16th 2017, 18:25 |
joop |
thank you for your answer slackbot5 |
# |
Apr 16th 2017, 18:23 |
admad |
joop: AppController::beforeRender() { if ($admin) $this->viewBuilder()->layout('admin_layout'); } |