# |
Feb 16th 2020, 17:19 |
flashios09 |
i know how to do it with cake(just force the response content type to `application/json` ) |
# |
Feb 16th 2020, 17:18 |
ricksaccous |
this is more for cake in general |
# |
Feb 16th 2020, 17:18 |
ricksaccous |
oh sorry i don't know about the crud plugin |
# |
Feb 16th 2020, 17:18 |
ricksaccous |
I think |
# |
Feb 16th 2020, 17:18 |
ricksaccous |
you'd set dataType to json |
# |
Feb 16th 2020, 17:18 |
flashios09 |
@ricksaccous how ? what is the hook that i have to use ? beforeFilter ? beforeRender ? |
# |
Feb 16th 2020, 17:18 |
ricksaccous |
if you are using jquery.ajax |
# |
Feb 16th 2020, 17:17 |
ricksaccous |
@flashios09 yes, just pass the headers in the request and cake will treat it as json |
# |
Feb 16th 2020, 15:49 |
flashios09 |
will output: ```{ "success": true, "data": {...} }``` |
# |
Feb 16th 2020, 15:48 |
flashios09 |
i mean something like this `http://cakeapi.test/posts/1` |
# |
Feb 16th 2020, 15:47 |
flashios09 |
is it possible to display the json on the browser without using the `.json` extension ? |
# |
Feb 16th 2020, 15:46 |
flashios09 |
i’m trying the friendsofcake/crud plugin |
# |
Feb 16th 2020, 15:46 |
flashios09 |
hi |
# |
Feb 16th 2020, 13:48 |
narendravaghela |
anyone has faced this issue? |
# |
Feb 16th 2020, 13:48 |
narendravaghela |
CakePHP 4 - It runs the action twice |
# |
Feb 16th 2020, 13:44 |
admad |
https://github.com/FriendsOfCake/search/releases/tag/6.0.0-beta |
# |
Feb 16th 2020, 13:06 |
damiano |
i do not know, admad you are following this plugin, can it be used? |
# |
Feb 16th 2020, 13:05 |
damiano |
the first do not have ver. 4 branch |
# |
Feb 16th 2020, 13:05 |
damiano |
pardon i said cakedc/search but it is friendofcake/search, my wrong |
# |
Feb 16th 2020, 13:05 |
damiano |
i really do not know if it can be used with cake4 |
# |
Feb 16th 2020, 13:05 |
damiano |
Search provides a simple interface to create paginate-able filters for your >>> CakePHP 3.x <<< application. |
# |
Feb 16th 2020, 13:04 |
damiano |
@admad https://github.com/FriendsOfCake/search/tree/cake-4.x |
# |
Feb 16th 2020, 13:03 |
damiano |
admad i do not know :) i just found the 4.x branch |
# |
Feb 16th 2020, 13:02 |
admad |
If it was considered stable there would be a stable release |
# |
Feb 16th 2020, 12:38 |
damiano |
hello! is the 4.x branch of cakedc/search plugin ready/stable? |
# |
Feb 16th 2020, 08:15 |
christianjohn.gss |
and I finished it but I experience a problem, thee login does not work with identify(); |
# |
Feb 16th 2020, 08:15 |
christianjohn.gss |
hello so I tried the cms tutorial on cakephp |
# |
Feb 16th 2020, 05:00 |
latenal |
This is a very simple structure only 2 levels. Is there any plugin for it or something? |
# |
Feb 16th 2020, 04:50 |
admad |
You can't |
# |
Feb 16th 2020, 04:27 |
latenal |
The tree is returned corrupted: there are children without parents |
# |
Feb 16th 2020, 01:54 |
latenal |
What is the right way to paginate `find('threaded')` ? |
# |
Feb 15th 2020, 23:16 |
rochasmarcelo |
What do you need exactly in url? You can set a custom url for login |
# |
Feb 15th 2020, 16:57 |
hippo |
BodyParserMiddleware was actually included but I put the auth before it, so auth was failing but is was working in other places :thinking_face: |
# |
Feb 15th 2020, 16:56 |
hippo |
New project on 4 :) |
# |
Feb 15th 2020, 16:51 |
admad |
He could be using < 3.6 though :P |
# |
Feb 15th 2020, 16:50 |
admad |
Yup I noticed but better to avoid a suggestion which will need changing when upgrading :) |
# |
Feb 15th 2020, 16:49 |
ndm |
Yeah, but `$this->request->data()` looked kinda 3ish :) |
# |
Feb 15th 2020, 16:48 |
admad |
@ndm BodyParserMiddleware is the only option in 4 |
# |
Feb 15th 2020, 16:41 |
hippo |
Middleware is perfect, thanks @ndm! |
# |
Feb 15th 2020, 16:40 |
hippo |
Ahh perfect, I knew there has to be something. |
# |
Feb 15th 2020, 16:37 |
ndm |
@hippo Built in solutions would be the body parser middleware (https://book.cakephp.org/3/en/controllers/middleware.html#body-parser-middleware) or the request handler component (https://book.cakephp.org/3/en/controllers/components/request-handling.html) |