# |
Feb 11th 2018, 15:54 |
maymeow |
@dereuromark just trying ways to create api. for example i have creaated api resource class -> my projects ``` class ProjectResource extends Resource { public function toArray() { return [ 'id' => $this->entity->id, 'name' => $this->entity->name, 'description' => $this->entity->description, 'profile' => function ($q) { return (new |
# |
Feb 11th 2018, 15:53 |
K4T |
do we have any solutions in CakePhP3 which allow us to track/keep history of changes in table? |
# |
Feb 11th 2018, 15:50 |
loginews |
can anyone give me a hint on my dateFormat question ? |
# |
Feb 11th 2018, 15:48 |
admad |
https://github.com/jeremyharris/cakephp-lazyload/ |
# |
Feb 11th 2018, 15:48 |
admad |
https://github.com/jeremyharris/cakephp-lazyload/ |
# |
Feb 11th 2018, 15:36 |
dereuromark |
can be done, but why? :slightly_smiling_face: |
# |
Feb 11th 2018, 15:31 |
maymeow |
@dereuromark what about loading asociated models with virtual properties? |
# |
Feb 11th 2018, 15:06 |
admad |
@rochasmarcelo fixed, thanks for reporting |
# |
Feb 11th 2018, 14:26 |
loginews |
File uploaded https://cakesf.slack.com/files/U435V89H8/F985Z2CGN/-.txt / https://slack-files.com/T053DPNCM-F985Z2CGN-b1cfe37bb0 - The above input still displays the field in YMD format. What did I miss ? |
# |
Feb 11th 2018, 13:53 |
maymeow |
any other idea how to create api??? (i need there some virtuaal fields).... But without installing 3rd party plugins... it will looks like wordpress where i want one button in template aand need install 30 plugins :) |
# |
Feb 11th 2018, 13:16 |
maymeow |
im using both of frameworks |
# |
Feb 11th 2018, 13:16 |
maymeow |
i do not |
# |
Feb 11th 2018, 13:15 |
K4T |
please do not start another religious war ;d |
# |
Feb 11th 2018, 13:12 |
dereuromark |
@maymeow thats an antipattern usually :slightly_smiling_face: |
# |
Feb 11th 2018, 13:00 |
maymeow |
is there any way (like in laravel) anytime i call associated model to get data??? (Without using contain in query)... ??? |
# |
Feb 11th 2018, 12:56 |
K4T |
each entity new flag back to false* |
# |
Feb 11th 2018, 12:55 |
K4T |
which are not new. Is there a wy which allow me to solve that puzzle without reiterating whole entities array after first save and set each intity flag back to false? |
# |
Feb 11th 2018, 12:55 |
K4T |
I need to store the same entities in two different tables with the same structure. Tables are: tab_a and tab_a_history. My problem is that when I save array of entities to tab_a all entities are modified (marked as saved) by save method (flag new is set to false in each entity etc). Becuase of that I can not call save on second table becuase ::save method will not execute sql for entities |
# |
Feb 11th 2018, 10:22 |
loginews |
The above input still displays the field in YMD format. What did I miss ? |
# |
Feb 11th 2018, 10:22 |
loginews |
File uploaded https://cakesf.slack.com/files/U435V89H8/F9857957Y/-.txt / https://slack-files.com/T053DPNCM-F9857957Y-d33d161bd1 |
# |
Feb 11th 2018, 10:10 |
marcin2828 |
it gives header 502 - so technical problems |
# |
Feb 11th 2018, 10:09 |
rochasmarcelo |
@savant hi do you know what is happening with plugins.cakephp.org? It is offline |
# |
Feb 11th 2018, 09:21 |
marcin2828 |
thx for the help! |
# |
Feb 11th 2018, 09:16 |
marcin2828 |
so /find/recordsList will always point to cell defined in routes |
# |
Feb 11th 2018, 09:15 |
marcin2828 |
here is my solution : I will not need cell aliasing - as for different cells like - RecordsList (default cell) , RecordsListCustomerABC (custom cell) - I will use routes , which I will override per organisation |
# |
Feb 11th 2018, 09:14 |
marcin2828 |
so each cell allows to draw different forms and modify query object used to filter out data |
# |
Feb 11th 2018, 09:13 |
slackebot1 |
( values form form as passed to that cell) cell displays only data |
# |
Feb 11th 2018, 09:13 |
marcin2828 |
so cells are already part of the puglin that allows to access that group of functionalities, I have dummy controller with single action that accepts cell name and then renders primary method of that cell, depending if request comes via GET or AJAX , each cell renders form built from cell config (so each cell can display own set of fields) , and uses that form to filter out data which is also displays ; when request comes via ajax call |
# |
Feb 11th 2018, 09:08 |
marcin2828 |
no, but I think I found answer to my question already ... |
# |
Feb 11th 2018, 09:08 |
saeideng |
you can put your cell into plugins |
# |
Feb 11th 2018, 09:08 |
saeideng |
? |
# |
Feb 11th 2018, 09:08 |
saeideng |
`/plugins/org1/` , `/plugins/org2/` |
# |
Feb 11th 2018, 09:07 |
saeideng |
do you use plugins for your themes ? |
# |
Feb 11th 2018, 09:06 |
marcin2828 |
and soon instead of 20 asctions I will have 40 , 60 and so on .... |
# |
Feb 11th 2018, 09:05 |
saeideng |
>wants to manage same part of the system differently create 2 action or pass arg |
# |
Feb 11th 2018, 09:04 |
marcin2828 |
so I moved logic to cells (which was correct move in my particular case as forms build by cell's views are re-used on good few pages) |
# |
Feb 11th 2018, 09:03 |
marcin2828 |
For an example two organisations wants to manage same part of the system differently - I want to avoid creating plugins for small bits like that ... |
# |
Feb 11th 2018, 09:01 |
saeideng |
why? |
# |
Feb 11th 2018, 08:59 |
marcin2828 |
Hello everyone, I have a question about cells : Is there any way to alias cells? |
# |
Feb 11th 2018, 08:53 |
K4T |
ok, I think now I got it... well... (facepalm) |
# |
Feb 11th 2018, 08:48 |
K4T |
yeah, I read it few times, I probably do not understand something here as I am not interested in creating new collection. I want to modify items within existing collection. That is why I choosed each. Anyway thank you for help, I will use map now. |