# |
May 22nd 2018, 19:07 |
ksc |
I didn't find that in the jsonapi specification... |
# |
May 22nd 2018, 19:05 |
ksc |
Is this correct? |
# |
May 22nd 2018, 19:05 |
ksc |
File uploaded https://cakesf.slack.com/files/U6XDU1S5A/FAU6JP3PD/-.txt / https://slack-files.com/T053DPNCM-FAU6JP3PD-257fdd0479 |
# |
May 22nd 2018, 19:05 |
ksc |
Okay thank you. I expect a request body to create both (object + related object) just without the id, e.g. |
# |
May 22nd 2018, 18:59 |
bravo-kernel |
feel free to help debugging |
# |
May 22nd 2018, 18:59 |
bravo-kernel |
you may be able to create `hasMany` related object but the response (view) will probably fail |
# |
May 22nd 2018, 18:57 |
bravo-kernel |
working examples of creating a single Resource with (one or multiple) `belongsTo` can be found here https://github.com/FriendsOfCake/crud-json-api/tree/master/tests/Fixture/JsonApiResponseBodies/CreatingResources |
# |
May 22nd 2018, 18:57 |
bravo-kernel |
@ksc there seem to be some issues with `hasMany` |
# |
May 22nd 2018, 18:56 |
ksc |
Hi, I want to create one object and his related object in one request with the crud-json-api plugin. Does someone have some examples for this use case or in general add or edit objects and their related objects? Or is this out of scope / not wanted e.g. : Users, UserDetails (1:n or 1:1) |
# |
May 22nd 2018, 18:46 |
rochasmarcelo |
What is the status of https://github.com/cakephp/authorization? There is any planned date to release a stable version? |
# |
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: |