# |
Jul 11th 2019, 12:21 |
neon1024 |
With `beforeFind` are the options passed to it from the find() ? |
# |
Jul 11th 2019, 11:57 |
neon1024 |
Yeah |
# |
Jul 11th 2019, 11:55 |
neon1024 |
Ah, I bet it’s that pesky behaviour! |
# |
Jul 11th 2019, 11:54 |
neon1024 |
Seems to be doing a transaction with a huge UNION query and then rollsback |
# |
Jul 11th 2019, 11:50 |
neon1024 |
I am failing to create a new record using my add method. The resulting entity had no errors, and the associated data is being marshalled correctly, I’m a bit out of ideas on what else to check |
# |
Jul 11th 2019, 11:47 |
roel |
Hello everyone, I was wondering if there is a way to trigger a cli command with Cakephp Commands, like: I have a cronjob that triggers a cakephp command every hour. If this command find some data in the database, it needs to trigger a nodejs script. Thanks in advance |
# |
Jul 11th 2019, 11:26 |
admad |
Yup it has makings of a good match |
# |
Jul 11th 2019, 11:16 |
neon1024 |
But we’ll see, it’s exciting! :slightly_smiling_face: |
# |
Jul 11th 2019, 11:16 |
neon1024 |
I can only imagine the grilling the Indian top order are getting in the Indian press |
# |
Jul 11th 2019, 11:15 |
neon1024 |
Yeah true, they have made more than 1 run :,) |
# |
Jul 11th 2019, 11:14 |
admad |
@neon1024 it's still curtains for you if they cross 250 :slightly_smiling_face: |
# |
Jul 11th 2019, 10:15 |
neon1024 |
Here is the bit with env https://book.cakephp.org/3.0/en/development/configuration.html#environment-variables |
# |
Jul 11th 2019, 10:15 |
neon1024 |
Here is the setup with config files, https://book.cakephp.org/3.0/en/development/configuration.html#loading-additional-configuration-files |
# |
Jul 11th 2019, 10:15 |
neon1024 |
I was sure there was a bit about it in the book |
# |
Jul 11th 2019, 10:14 |
s.ahmad |
Thanks :+1: |
# |
Jul 11th 2019, 10:13 |
neon1024 |
You can see the default env file here https://github.com/cakephp/app/blob/master/config/.env.default |
# |
Jul 11th 2019, 10:13 |
s.ahmad |
Okay i am using the same |
# |
Jul 11th 2019, 10:13 |
neon1024 |
It’s built into Cake thankfully |
# |
Jul 11th 2019, 10:13 |
neon1024 |
I’d use env vars for that |
# |
Jul 11th 2019, 10:13 |
s.ahmad |
@neon1024 what is the best way to have configuration values separate for each environment like production and development |
# |
Jul 11th 2019, 10:11 |
s.ahmad |
:+1: |
# |
Jul 11th 2019, 10:11 |
neon1024 |
Ahh, bootstrap helper has `multiCheckbox` :slightly_smiling_face: |
# |
Jul 11th 2019, 10:05 |
neon1024 |
I was so sure there was a method in the helper to generate a list of checkboxes |
# |
Jul 11th 2019, 10:03 |
neon1024 |
Rather than looping my options and creating the inputs |
# |
Jul 11th 2019, 10:02 |
neon1024 |
`$this->Form->control('providers._ids')` can I easily swap this from select to checkboxes? |
# |
Jul 11th 2019, 09:57 |
mehov |
Found it: `\Cake\Utility\Hash::combine($results, '{n}.id', '{n}.id', '{n}.group');`. That'll do for now :slightly_smiling_face: |
# |
Jul 11th 2019, 09:57 |
neon1024 |
I don’t like the idea of `env()` calls in a template |
# |
Jul 11th 2019, 09:57 |
neon1024 |
I’d probably get the env somewhere once, and then set it to the templates and such |
# |
Jul 11th 2019, 09:48 |
s.ahmad |
Using cake3.8 |
# |
Jul 11th 2019, 09:47 |
s.ahmad |
Actually i want to keep my configuration values in .env file and use them directly where ever it required |
# |
Jul 11th 2019, 09:47 |
s.ahmad |
Can i get env value in controller, template and in component? |
# |
Jul 11th 2019, 09:46 |
s.ahmad |
Hey guys |
# |
Jul 11th 2019, 09:43 |
neon1024 |
@admad *cough* |
# |
Jul 11th 2019, 09:39 |
mehov |
Tried `\Cake\Utility\Hash::combine($items, '{n}.type', '{n}.name');` but it gets me only the last names per type |
# |
Jul 11th 2019, 09:27 |
slackebot |
using one of the `\Cake\Utility\Hash` functions? |
# |
Jul 11th 2019, 09:27 |
mehov |
Hey guys, I have: $items = [ [ 'type' => 'fruit', 'name' => 'apple', ], [ 'type' => 'fruit', 'name' => 'pear', ], [ 'type' => 'fruit', 'name' => 'banana', ], ]; Do you think there is an easy way to have it converted to $items = [ 'fruit' => [ 'apple', 'pear', 'banana', ], ]; |
# |
Jul 11th 2019, 09:24 |
neon1024 |
In 3.7 |
# |
Jul 11th 2019, 09:24 |
neon1024 |
So ‘joinTable’ doesn’t take a FQDN |
# |
Jul 11th 2019, 09:09 |
neon1024 |
We got to No 1 in the world chasing, so we shall see! |
# |
Jul 11th 2019, 09:08 |
admad |
@neon1024 Aus won the toss, means Eng should start packing their bags :slightly_smiling_face: |
# |
Jul 11th 2019, 09:00 |
patox44 |
Hello. How Can I unset part of array which I got in response->json via REST (GET Method)? |