# |
Nov 15th 2017, 13:23 |
inoas |
but you can use cake3 conventions perfectly fine |
# |
Nov 15th 2017, 13:23 |
inoas |
HumanG33k: ok postgres maybe has something similar |
# |
Nov 15th 2017, 13:22 |
HumanG33k |
but ok |
# |
Nov 15th 2017, 13:22 |
HumanG33k |
i use pgsql, hum i like cake conventions. |
# |
Nov 15th 2017, 13:22 |
inoas |
would redis be a good choice for that? and php serialization? |
# |
Nov 15th 2017, 13:22 |
inoas |
I want to cache Cake\Http\Client requests/responses |
# |
Nov 15th 2017, 13:21 |
inoas |
if you got more than foreign keys, such as booleans, you should create a stand alone model anyway |
# |
Nov 15th 2017, 13:21 |
inoas |
usually enough for weak entities (join tables) |
# |
Nov 15th 2017, 13:21 |
inoas |
also in mariadb/recent mysql you can use current_timestamp or current_timestamp(6) to auto-fill created |
# |
Nov 15th 2017, 13:20 |
inoas |
Students HABTM Courses THROUGH Memberships |
# |
Nov 15th 2017, 13:20 |
inoas |
and then in the table setup Timestamp behavior |
# |
Nov 15th 2017, 13:20 |
inoas |
and through |
# |
Nov 15th 2017, 13:20 |
inoas |
HumanG33k: you can do it with a real association |
# |
Nov 15th 2017, 13:19 |
dereuromark |
I would have thought that providing a table class for it that loads the behavior would work |
# |
Nov 15th 2017, 13:18 |
dereuromark |
you mean in habtm pivot tables? |
# |
Nov 15th 2017, 13:18 |
HumanG33k |
cake 3 not support created columns in table like firsts_seconds(#first_id,#second_id,created) ? it looks usefull for log/stat |
# |
Nov 15th 2017, 13:14 |
obinoob |
*shot |
# |
Nov 15th 2017, 13:14 |
obinoob |
so my best shor here is to disable csrf for action in question, however I can send the _csrfToken within the form body ( by using data: {'_csrfToken': $.cookie('_csrfToken')} ) not sure whats happening here got to read x-editable source but pretty sure that x-edtable library has some way to get around it why they make available: ajaxOptions ?!? |
# |
Nov 15th 2017, 12:58 |
obinoob |
dereuromark no I haven't :D but hey thank you |
# |
Nov 15th 2017, 12:38 |
dereuromark |
if you google for that, you will find like https://stackoverflow.com/questions/44454785/how-to-define-csrf-token-in-ajax-call-in-cakephp-3-also-how-csrf-can-be-off-for |
# |
Nov 15th 2017, 12:37 |
dereuromark |
csrf and ajax usually do not play along too well |
# |
Nov 15th 2017, 12:35 |
obinoob |
dereuromark yes i've and I've found a plugin etc but not gonna use it for now... the thing is: my controller is very simple just compacting the $this->request->data() in order to debug this! Now, i can see that Form Data only as the csrf token no data-pk data-name etc but as soon as I remove the ajaxOptions data I can send see those values filled in Data Form?!? |
# |
Nov 15th 2017, 12:26 |
dereuromark |
Did you try to google "x-editable cakephp"? You will find results right at the top for a plugin etc. |
# |
Nov 15th 2017, 12:24 |
obinoob |
hi, anyone ever used x-editable with cakephp 3? i'm having a bit of trouble sending csrf token this is my front end example https://gist.github.com/obinoob/0f037cddba9a5e268245d663155455f9 |
# |
Nov 15th 2017, 12:23 |
acosonic |
my team also logs to mysql errors, and stuff like when some bots are trying to access wp-login or phpmyadmin... And once I catch some time I'll create honeypot trap and fail2ban rule to ban such bots... |
# |
Nov 15th 2017, 11:40 |
inoas |
I'd consider myisam for mysql/mariadb log ;) |
# |
Nov 15th 2017, 11:40 |
inoas |
too much of a real database for pure logs anyway ;p |
# |
Nov 15th 2017, 11:36 |
dereuromark |
yeah, not sure about the postgres compat. yet |
# |
Nov 15th 2017, 11:36 |
inoas |
you mean you are using mysql as the log backend, ok same plan |
# |
Nov 15th 2017, 11:35 |
dereuromark |
only for mysql though |
# |
Nov 15th 2017, 11:35 |
dereuromark |
sure |
# |
Nov 15th 2017, 11:35 |
inoas |
dereuromark are you using https://github.com/dereuromark/CakePHP-DatabaseLog in production recently? |
# |
Nov 15th 2017, 11:24 |
dereuromark |
Looking forward to seeing you later @ https://twitter.com/dereuromark/status/930757638803087360 |
# |
Nov 15th 2017, 10:59 |
danishkhan3621 |
I want to point to webroot of a plugins folder but this code echo $this->Html->css('/dist/css/skins/_all-skins.min.css'); is pointing to the main application webroot in cakephp 3 |
# |
Nov 15th 2017, 10:44 |
acosonic |
hey @dereuromark I'm at "La pascarella" :) sitting alone, great place... |
# |
Nov 15th 2017, 10:34 |
dfens |
like cake bake migration CreateCampaignDays name winset_id |
# |
Nov 15th 2017, 10:34 |
dfens |
can i add a foreign key when doing cake bake migrations? |
# |
Nov 15th 2017, 10:19 |
stoykovnet |
Thanks a lot! :-) |
# |
Nov 15th 2017, 10:16 |
dereuromark |
also check awesome list |
# |
Nov 15th 2017, 10:16 |
dereuromark |
Search eav term and cakephp |
# |
Nov 15th 2017, 10:07 |
slackebot2 |
each custom field should have it's own type. Can you tip me with anything: like good practices, plugins or projects where such situation is handled nicely? :thinking_face: ,:) I was thinking of creating the following tables: `post_custom_fields` related to `custom_field_types` and `posts`. But would it do any good? |