# |
Apr 19th 2017, 15:09 |
crazycoder |
:D |
# |
Apr 19th 2017, 15:04 |
Neon1024 |
Not that I did that last week :p |
# |
Apr 19th 2017, 15:04 |
Neon1024 |
If like me you develop on Mac OS and go live on Ubuntu |
# |
Apr 19th 2017, 15:04 |
Neon1024 |
Otherwise you might put it into production and nothing will work |
# |
Apr 19th 2017, 15:03 |
Neon1024 |
I’d also double check that a plugin called ‘API’ works okay on case sensitive file systems |
# |
Apr 19th 2017, 15:03 |
crazycoder |
thanks! |
# |
Apr 19th 2017, 15:02 |
Neon1024 |
(y) |
# |
Apr 19th 2017, 15:02 |
Neon1024 |
Controllers are Capitalised |
# |
Apr 19th 2017, 15:02 |
crazycoder |
/ <-- |
# |
Apr 19th 2017, 15:02 |
crazycoder |
that's the problem |
# |
Apr 19th 2017, 15:02 |
Neon1024 |
Thirdly |
# |
Apr 19th 2017, 15:02 |
crazycoder |
Neon1024, yeah |
# |
Apr 19th 2017, 15:02 |
Neon1024 |
Plus, I always tend to prefix my routes with a / |
# |
Apr 19th 2017, 15:02 |
crazycoder |
but why? i wrote the action there |
# |
Apr 19th 2017, 15:02 |
Neon1024 |
Not sure the plugin name should be all UPPERCASE |
# |
Apr 19th 2017, 15:02 |
crazycoder |
yes it use the 1 as the action |
# |
Apr 19th 2017, 15:01 |
Neon1024 |
Two things stand out to me |
# |
Apr 19th 2017, 15:01 |
crazycoder |
Neon1024, {"controller":"Agents","action":"1","pass":["cv"],"plugin":"API","_ext":"json"} |
# |
Apr 19th 2017, 15:01 |
Neon1024 |
Also, beware of exposing auto-increment id’s in your api urls |
# |
Apr 19th 2017, 15:01 |
crazycoder |
Neon1024, https://gist.github.com/anonymous/4dc2c6942fef4025587de9198273c6f9 |
# |
Apr 19th 2017, 15:00 |
Neon1024 |
crazycoder: bin/cake routes check /api/agents/1/cv.json |
# |
Apr 19th 2017, 15:00 |
Neon1024 |
crazycoder: Route isn’t matchig the extension and is instead falling back to another route |
# |
Apr 19th 2017, 15:00 |
Neon1024 |
crazycoder: Not inside the api prefix? |
# |
Apr 19th 2017, 14:59 |
saeideng |
this routes not math with your defination |
# |
Apr 19th 2017, 14:58 |
saeideng |
see routes panel in your debug_kit |
# |
Apr 19th 2017, 14:52 |
crazycoder |
why does it take the 1 as the action name ? |
# |
Apr 19th 2017, 14:52 |
crazycoder |
with /api/agents/1/cv.json |
# |
Apr 19th 2017, 14:52 |
crazycoder |
2017-04-19 16:51:43 Error: [Cake\Controller\Exception\MissingActionException] Action AgentsController::1() could not be found, or is not accessible. |
# |
Apr 19th 2017, 14:52 |
crazycoder |
$routes->connect(':controller/:id/cv', ['controller' => 'Agents', 'action' => 'cv', 'plugin' => 'API']); |
# |
Apr 19th 2017, 14:44 |
mampel |
@dakota thank I fixed that |
# |
Apr 19th 2017, 14:41 |
saeideng |
languagae array ? |
# |
Apr 19th 2017, 13:51 |
greitas |
how to get two different languagae array in the same time? |
# |
Apr 19th 2017, 13:50 |
greitas |
hi. |
# |
Apr 19th 2017, 13:50 |
crazycoder |
hmic, thanks! |
# |
Apr 19th 2017, 13:49 |
crazycoder |
ok |
# |
Apr 19th 2017, 13:49 |
crazycoder |
awesome |
# |
Apr 19th 2017, 13:49 |
hmic |
so add it to the _hidden property and you are all good |
# |
Apr 19th 2017, 13:48 |
hmic |
check out the current implementations in the Datasource/EntityTrait, if thats the way you want/need to go |
# |
Apr 19th 2017, 13:48 |
crazycoder |
i only use it inside my controller when i have to do other jobs like saving etc |
# |
Apr 19th 2017, 13:48 |
crazycoder |
hmic, nono for json responses i do not want it |
# |
Apr 19th 2017, 13:47 |
hmic |
if you want it serialized by condition, you can overwrite the corresponding toArray() and jsonSerialize() functions in the entity to respect some custom information to decide to include the _joinData in the serialized data |