# |
Jul 11th 2017, 16:01 |
jeremyharris |
setter/getter |
# |
Jul 11th 2017, 16:00 |
jeremyharris |
ah |
# |
Jul 11th 2017, 16:00 |
ericadeefox |
it returns it if statusCode() is null, you can use it to set the status tho, I thought |
# |
Jul 11th 2017, 16:00 |
jeremyharris |
gotta use withX methods to create new responses to return |
# |
Jul 11th 2017, 15:59 |
jeremyharris |
withStatus :) I think statusCode returns the status code |
# |
Jul 11th 2017, 15:58 |
ericadeefox |
ahh it's `$this->response->statusCode(200)` it was a hybrid of both our answers :P |
# |
Jul 11th 2017, 15:58 |
jeremyharris |
I think by default the status code is 200, so you can probably just return $this->response |
# |
Jul 11th 2017, 15:57 |
awi |
Everything else I can do by Exceptions |
# |
Jul 11th 2017, 15:57 |
ericadeefox |
it's like `$this->statusCode(200)` |
# |
Jul 11th 2017, 15:57 |
jeremyharris |
I think return $this->response->withStatusCode(200) |
# |
Jul 11th 2017, 15:57 |
awi |
just a 200, no template whatsoever |
# |
Jul 11th 2017, 15:57 |
awi |
How do i return a 200 |
# |
Jul 11th 2017, 15:56 |
rudy1976s |
yes |
# |
Jul 11th 2017, 15:56 |
hmic |
is that a hasMany? |
# |
Jul 11th 2017, 15:56 |
hmic |
you are talking about a node, not a relation |
# |
Jul 11th 2017, 15:55 |
rudy1976s |
Relations belongsTo Nodes |
# |
Jul 11th 2017, 15:54 |
hmic |
so thats a hasMany relation? |
# |
Jul 11th 2017, 15:53 |
rudy1976s |
i tried adding the .node and it results null |
# |
Jul 11th 2017, 15:53 |
hmic |
collections go deep |
# |
Jul 11th 2017, 15:53 |
hmic |
you can do that |
# |
Jul 11th 2017, 15:52 |
rudy1976s |
https://gist.github.com/rudy1976s/5b5af38306c6bbf8d09dc7b5cf0d1284 |
# |
Jul 11th 2017, 15:52 |
rudy1976s |
I have cut down the array because it was too long |
# |
Jul 11th 2017, 15:49 |
rudy1976s |
ok wait |
# |
Jul 11th 2017, 15:49 |
rudy1976s |
I see that I can use dot notation to reach inner values |
# |
Jul 11th 2017, 15:49 |
jeremyharris |
yeah gisting what you’ve got and what you want would be helpful |
# |
Jul 11th 2017, 15:48 |
jeremyharris |
collections sort of figure that out for you |
# |
Jul 11th 2017, 15:48 |
hmic |
or explain your usecase |
# |
Jul 11th 2017, 15:48 |
hmic |
check the docs maybe on what you need to do |
# |
Jul 11th 2017, 15:48 |
hmic |
of course not |
# |
Jul 11th 2017, 15:48 |
rudy1976s |
but i cant use {n} like in hash |
# |
Jul 11th 2017, 15:46 |
rudy1976s |
I tried with collections |
# |
Jul 11th 2017, 15:40 |
jeremyharris |
that’s why we’re here :slightly_smiling_face: |
# |
Jul 11th 2017, 15:40 |
sturm |
Thanks, @hmic. As a newb, I most definitely will need to do so. Thus, I apologize in advance for the mass of questions I’ll inevitably be asking in the coming days/weeks. |
# |
Jul 11th 2017, 15:40 |
ericadeefox |
I learned from just making databases of random stuff I thought was cool, like discographies of my fav musicians, and baking everything to death and then picking apart whatever was baked and spending a million years in the docs |
# |
Jul 11th 2017, 15:39 |
hmic |
you'll love it! and you are in the right place to ask your questions too |
# |
Jul 11th 2017, 15:38 |
sturm |
That’s where I’m going now, @hmic. |
# |
Jul 11th 2017, 15:38 |
hmic |
you could just have followed the tutorials from the book. they are very good |
# |
Jul 11th 2017, 15:37 |
sturm |
@ericadeefox Yes. |
# |
Jul 11th 2017, 15:37 |
ericadeefox |
@sturm was it lousy or unhelpful? |
# |
Jul 11th 2017, 15:37 |
sturm |
Wow. Finally finished the Lynda course on learning CakePHP 3. I’ll never get those 5 hours back, sadly. |
# |
Jul 11th 2017, 15:37 |
hmic |
rudy1976s: thats only a convenience argument, as the Collection will need to foreach your resultset anyways! |