# |
Jun 30th 2017, 15:00 |
joepferguson |
@phpnut Last time I seriously played with Cake was the early 2.x days. It’s awesome to see how far it’s come :) |
# |
Jun 30th 2017, 14:59 |
jeremyharris |
that happens *before* the request data becomes an entity and before validation |
# |
Jun 30th 2017, 14:59 |
jeremyharris |
beforeMarshal is probably what you’re looking for |
# |
Jun 30th 2017, 14:59 |
irongomme |
What the way to automaticaly generate a field on before save which is not provided in the form. If i use beforeRules event to auto generate de field value, it doesnt validate because the field is not yet generated ... ? |
# |
Jun 30th 2017, 14:47 |
phpnut |
Welcome to the dark side @joepferguson muhahaha |
# |
Jun 30th 2017, 14:45 |
phpnut |
More options!!!! |
# |
Jun 30th 2017, 14:40 |
dakota |
:slightly_smiling_face: |
# |
Jun 30th 2017, 14:40 |
joepferguson |
@dakota Nothing wrong with it. Just throwing another option out there. |
# |
Jun 30th 2017, 14:38 |
dakota |
joepferguson, what's wrong with https://github.com/alt3/cakebox :slightly_smiling_face: |
# |
Jun 30th 2017, 14:36 |
jeremyharris |
what SQL are you expecting from those conditions? |
# |
Jun 30th 2017, 14:32 |
eBugg |
cake 2.9 |
# |
Jun 30th 2017, 14:31 |
eBugg |
https://gist.github.com/anonymous/9207c618493b75c812e9d049773b5dd6 |
# |
Jun 30th 2017, 14:30 |
adriencs |
Cake 2 ? |
# |
Jun 30th 2017, 14:30 |
adriencs |
look weirdo |
# |
Jun 30th 2017, 14:30 |
eBugg |
but I pull $lista from $this->request-data and the format is wrong |
# |
Jun 30th 2017, 14:29 |
eBugg |
something like this: 'conditions' => [ '(transporte_id,asociado_id,operacion_venta_id)' => $lista ] |
# |
Jun 30th 2017, 14:29 |
adriencs |
@eBugg and do a damn Gist/Snippet ;) |
# |
Jun 30th 2017, 14:28 |
adriencs |
@eBugg replace things |
# |
Jun 30th 2017, 14:28 |
eBugg |
not sure it's ok to copy/paste code here... |
# |
Jun 30th 2017, 14:27 |
eBugg |
hi, i'm struggling with a find conditions problem... |
# |
Jun 30th 2017, 14:18 |
joepferguson |
If anyone is in the market for a managed vagrant box for local development, check out https://www.joeferguson.me/using-homestead-with-cakephp-framework/ |
# |
Jun 30th 2017, 13:48 |
ian_d_h |
You main this page? https://book.cakephp.org/2.0/en/installation/advanced-installation.html#installing-cakephp-with-composer |
# |
Jun 30th 2017, 13:45 |
cjquinn |
Like recreating the autoload file? |
# |
Jun 30th 2017, 13:20 |
neon1024 |
Can anyone recall is there is a book page about using Composer with CakePHP 2.x? About re-binding the autoloader when you use Composers autoloader |
# |
Jun 30th 2017, 13:16 |
manuweg_ |
will be sure to use gist for posting code in future |
# |
Jun 30th 2017, 13:14 |
manuweg_ |
yes, but a nasty hack |
# |
Jun 30th 2017, 13:13 |
spencdev |
Ok so in the end you got it to work? |
# |
Jun 30th 2017, 13:11 |
manuweg_ |
apologies |
# |
Jun 30th 2017, 13:11 |
manuweg_ |
just downloaded this client and havent set that up |
# |
Jun 30th 2017, 13:11 |
manuweg_ |
yes, sorry |
# |
Jun 30th 2017, 13:11 |
spencdev |
https://gist.github.com/ |
# |
Jun 30th 2017, 13:10 |
spencdev |
whoa |
# |
Jun 30th 2017, 13:09 |
manuweg_ |
anyway I just set $max to 10 which allows faker to run and insert the fake data |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
$max = pow(10, $nbDigits) - 1; |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
and this line is where the variable is being sets that causes the exception |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
} |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
return mt_rand(0, $max); |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
} |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
return mt_rand(pow(10, $nbDigits - 1), $max); |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
if ($strict) { |
# |
Jun 30th 2017, 13:08 |
manuweg_ |
} |