# |
Nov 15th 2017, 10:07 |
stoykovnet |
Hey Cake! At work I was asked to implement a functionality, where the users should be able to define their own custom fields (up to 5) to some model (let's say Posts). For example, one user would want to add two fields with labels "Source" and "Publisher", but another user wants to have fields with labels "Company name" and "Status". Then for each Post the user should be able to add values for those fields. To add more to the challenge |
# |
Nov 15th 2017, 09:56 |
saeideng |
or see validation and chronos classs maybe you able to find proper method |
# |
Nov 15th 2017, 09:55 |
saeideng |
dfens : custom validate |
# |
Nov 15th 2017, 09:44 |
k4t |
just a typo neon :P |
# |
Nov 15th 2017, 09:40 |
kaliel |
Hi everyone, is that the expected behavior for Collection::sortBy() to keep original index of array ? |
# |
Nov 15th 2017, 09:39 |
megan |
lol |
# |
Nov 15th 2017, 09:37 |
neon1024 |
I’m neither a lady, nor married. Sorry ;) |
# |
Nov 15th 2017, 09:36 |
neon1024 |
Mrs? |
# |
Nov 15th 2017, 09:36 |
k4t |
hello Mrs neon1024 |
# |
Nov 15th 2017, 09:33 |
neon1024 |
Morning everyone |
# |
Nov 15th 2017, 09:28 |
dfens |
but whats the validation method for it |
# |
Nov 15th 2017, 09:16 |
saeideng |
`$timestamp1<$timestamp2` |
# |
Nov 15th 2017, 09:15 |
saeideng |
convert to timestamp |
# |
Nov 15th 2017, 07:42 |
dfens |
somethink like $validator->greaterThan('startTime','endTime') |
# |
Nov 15th 2017, 07:41 |
dfens |
*field |
# |
Nov 15th 2017, 07:41 |
dfens |
hi, how can i validate one time based filed to be greater than another (start-end time)? |
# |
Nov 14th 2017, 23:14 |
saeideng |
set json in bedorefilter |
# |
Nov 14th 2017, 22:24 |
meder |
is there a way to force an entire controller to use a json response, even with exceptions being thrown by cake? |
# |
Nov 14th 2017, 20:49 |
stoykovnet |
Everything, without vendors dir (which is ignored by default after cake installation) |
# |
Nov 14th 2017, 20:47 |
fensd |
ok thanks, makes sense, do you als have the whole cakephp in git? |
# |
Nov 14th 2017, 20:44 |
stoykovnet |
It's much better than ftp. |
# |
Nov 14th 2017, 20:42 |
stoykovnet |
@fensd I use this approach for deploying local changes to my remote server https://mikeeverhart.net/2013/01/using-git-to-deploy-code/ |
# |
Nov 14th 2017, 20:39 |
fensd |
is there something like yeoman for cakephp to create a nice build environment |
# |
Nov 14th 2017, 20:37 |
fensd |
i have set up sftp in phpstorm but i'd rather have a git based sync |
# |
Nov 14th 2017, 20:36 |
fensd |
hi, how do you guys setup your dev workflow, i'd like to develop local (win10) and deploy to a linux server, using migrations for db changes and a dev and live database, any hints or best practices? |
# |
Nov 14th 2017, 20:29 |
saeideng |
has anyone ? |
# |
Nov 14th 2017, 20:24 |
saeideng |
? |
# |
Nov 14th 2017, 20:24 |
saeideng |
in cakephp client |
# |
Nov 14th 2017, 20:24 |
saeideng |
what is equal to `curl -X POST -u .....` |
# |
Nov 14th 2017, 20:03 |
Es0teric |
i have something like $this->Html->link( $btn_text, array( 'plugin' => 'plugin_name', 'controller' => 'controller_name', 'action' => 'some_action', array('param1', 'param2'))); |
# |
Nov 14th 2017, 20:02 |
Es0teric |
if i am using the HTML helper, specifically the ->link() method -- how do i specify more than one param? |
# |
Nov 14th 2017, 19:04 |
ppisecky |
File uploaded https://cakesf.slack.com/files/U7HK6RAUW/F819GSCKH/set_default_query_condition_if_not_set_before.php / https://slack-files.com/T053DPNCM-F819GSCKH-ca85bd51ed |
# |
Nov 14th 2017, 19:03 |
ppisecky |
So finally can anyone see problems with the following: |
# |
Nov 14th 2017, 19:03 |
ppisecky |
Ok the example above had the proble of not passing `and$has_deleted_condition` to the `use` construct (i.e. not passing the variable as reference) |
# |
Nov 14th 2017, 18:42 |
ppisecky |
Can anyone please point me in the right direction? |
# |
Nov 14th 2017, 18:41 |
ppisecky |
I tried above to check if a query condition has been set in a where clause but that does not work because I cannot modify the `$has_deleted_condition` flag variable |
# |
Nov 14th 2017, 18:40 |
ppisecky |
File uploaded https://cakesf.slack.com/files/U7HK6RAUW/F7ZGRLS0Y/check_if_a_condition_has_been_set_and_if_not_set_default.php / https://slack-files.com/T053DPNCM-F7ZGRLS0Y-1b72b795d3 |
# |
Nov 14th 2017, 18:39 |
ppisecky |
I still need help with setting a default query condition in a `beforeFind` event listener |
# |
Nov 14th 2017, 17:56 |
flavius |
which are located in the cache-* dirs |
# |
Nov 14th 2017, 17:55 |
flavius |
i have a view helper with which I add any css or js file in any layout or view and then at the "end" it compiles and minifies all the files (css and js) into 1 css file and 1 js file |
# |
Nov 14th 2017, 17:52 |
etipaced |
So your layouts and views point to your cache-* dirs? |