# |
May 22nd 2018, 18:29 |
edgaras.jan |
maybe `$date < new Time('-24 hours')` |
# |
May 22nd 2018, 16:04 |
neon1024 |
Perhaps `isSameDay()` |
# |
May 22nd 2018, 16:03 |
neon1024 |
As `isPast()` will be true almost instantaneously |
# |
May 22nd 2018, 16:03 |
neon1024 |
To me it seems that isPast() should default to now and otherwise take a param to determine the now |
# |
May 22nd 2018, 16:02 |
neon1024 |
Because `isPast()` is just less than now |
# |
May 22nd 2018, 16:01 |
neon1024 |
All Iv’e got is `->isYesterday()` |
# |
May 22nd 2018, 16:01 |
neon1024 |
How do i find out if a datetime is older than 24 hours using the built in FrozenTime methods? I can’t find an appropriate method, mostly because the datetime stuff is a total mess |
# |
May 22nd 2018, 15:12 |
alexmax |
https://paste.ee/p/onpEW |
# |
May 22nd 2018, 15:11 |
alexmax |
I see in the docs where you can use a subquery in a `WHERE`, but not a `FROM` |
# |
May 22nd 2018, 15:11 |
alexmax |
Is it possible to use a subquery in a `FROM` statement using the CakePHP ORM? |
# |
May 22nd 2018, 14:51 |
hiryu85 |
already tested, same result |
# |
May 22nd 2018, 14:46 |
dereuromark |
try also `$response->getBody()->getContents()` etc. not sure what might work |
# |
May 22nd 2018, 14:44 |
hiryu85 |
Hello! I have a problem with (string) $response->getBody() (into a middleware) return empty string.. for what reason? If i delete the dd($response->getBody()) into pages i see my JSON object |
# |
May 22nd 2018, 14:33 |
spriz |
And :clap: for the API’s |
# |
May 22nd 2018, 14:33 |
spriz |
Gotta get them frustrations out |
# |
May 22nd 2018, 14:33 |
spriz |
Yeah, I’ll dig further into it at another time! Time for gym now! :) |
# |
May 22nd 2018, 14:33 |
bravo-kernel |
@spriz interesting and good to hear you’ve got it covered. APIs ftw |
# |
May 22nd 2018, 14:28 |
neothermic |
slightly tempted to really sit down and plan this concept out much better |
# |
May 22nd 2018, 14:27 |
neothermic |
@dereuromark thing is, is there a way to do it in cake3? ;) |
# |
May 22nd 2018, 14:26 |
neothermic |
if you pass in an autocomplete flag to the major one, it'll spit out the correct automcomplete ones for the subfields |
# |
May 22nd 2018, 14:26 |
spriz |
@bravo-kernel The security component was the culprit… :thinking_face: |
# |
May 22nd 2018, 14:25 |
neothermic |
really tempted to be evil and modify core |
# |
May 22nd 2018, 14:25 |
neothermic |
hah |
# |
May 22nd 2018, 14:19 |
dereuromark |
everything in 2.x is now more or a less a hack :slightly_smiling_face: |
# |
May 22nd 2018, 14:04 |
neothermic |
and while I could go inject these with JS, that's just a horrible hack :P |
# |
May 22nd 2018, 14:03 |
neothermic |
I want to pass autocomplete= [bday-day/bday-month/bday-year] to the right elements, but I can't seem to see any way to do this |
# |
May 22nd 2018, 14:02 |
neothermic |
I don't suppose, in Cake2, there's a way of injecting the autocomplete vars to each of the select elements a date input generates? |
# |
May 22nd 2018, 14:00 |
spriz |
No worries :tada: |
# |
May 22nd 2018, 14:00 |
bravo-kernel |
Sorry but I am not able to check anything right now, |
# |
May 22nd 2018, 14:00 |
bravo-kernel |
Hmmm |
# |
May 22nd 2018, 13:59 |
spriz |
but if I debug the event in the `beforeRedirect` crud callback it still has status => 302 @bravo-kernel :thinking_face: |
# |
May 22nd 2018, 13:56 |
spriz |
I see it :thinking_face: |
# |
May 22nd 2018, 13:56 |
bravo-kernel |
I can’t paste it now unfortunately |
# |
May 22nd 2018, 13:56 |
spriz |
Ooh |
# |
May 22nd 2018, 13:55 |
bravo-kernel |
JsonApiListener |
# |
May 22nd 2018, 13:55 |
spriz |
which listener? |
# |
May 22nd 2018, 13:55 |
bravo-kernel |
@spriz it could very well be because we disabled the redirect, see line 185 of the listener |
# |
May 22nd 2018, 13:54 |
itmpls |
and if that doesn't fly i'll check the extending method you did |
# |
May 22nd 2018, 13:53 |
itmpls |
since I don't need to deal with it at the app/controller level |
# |
May 22nd 2018, 13:52 |
itmpls |
thanks for pointing me in the right direction @flavius |
# |
May 22nd 2018, 13:52 |
itmpls |
I probably need this :slightly_smiling_face: just set the template array in the config and set that in the view |