# |
Dec 19th 2019, 07:42 |
javier.villanueva |
morning all |
# |
Dec 19th 2019, 06:48 |
yadav.manu36 |
Current query: $query = $this->Users->find(); $query->matching('Listings'); $query->matching('Organizations'); I need like this: $query = $this->Users->find(); $query->matching('Listings'); $query->orMatching('Organizations'); Please help me if have any solution about this type of query |
# |
Dec 19th 2019, 06:47 |
yadav.manu36 |
@admad can you please help me, i have post my query 17 Dec but i am not getting proper solution I have a problem Retrieving Data with matching 2 different different Association. I want if have 1 matching table from both matching then we want the result. it is possible using matching? behavior like we need according to matching and orMacthing senorio (edited) In the Laravel have option like: WhereHas() / orWhereHas |
# |
Dec 19th 2019, 06:44 |
yadav.manu36 |
@admad Thanks for this |
# |
Dec 19th 2019, 05:35 |
admad |
No, but you can use any other database management tool to do so, for e.g. mysql workbench |
# |
Dec 19th 2019, 05:12 |
yadav.manu36 |
Like this: https://quickadminpanel.com/blog/generate-sql-db-schema-image-with-laravel-er-diagram-generator/ |
# |
Dec 19th 2019, 05:12 |
yadav.manu36 |
In the CakePHP possible to Generate SQL DB Schema Image (ER Diagram)? |
# |
Dec 19th 2019, 05:10 |
yadav.manu36 |
Hi All Good morning |
# |
Dec 19th 2019, 01:12 |
nuzulfikrie |
I understand that the intention is to use cache, - but do i have to configure __cake__model_ to use the cache as well? |
# |
Dec 19th 2019, 00:55 |
nuzulfikrie |
how do i debug this? |
# |
Dec 19th 2019, 00:54 |
nuzulfikrie |
And I encountered error *The "_cake_model_" cache configuration does not exist.* |
# |
Dec 19th 2019, 00:54 |
slackebot |
`]` `],` `'Cache' => [` `'defaults' => [` `'className' => 'Cake\Cache\Engine\FileEngine',` `'path' => CACHE,` `'url' => env('CACHE_DEFAULT_URL', null),` `]` `],` |
# |
Dec 19th 2019, 00:54 |
nuzulfikrie |
hi support . On cake 3 here, I am trying to copy the ComboSession.php. Instead of using the APC engine, i used the file engine like so `'Session' => [` `'defaults' => 'database',` `'handler' => [` `'engine' => 'Manage\Http\Sessions\EagleSessions',` `'model' => 'Manage.UserSession',` `'cache' => 'defaults'` |
# |
Dec 19th 2019, 00:06 |
challgren |
Mailgun 5.0.0 has been released with support for CakePHP 4.0.0 https://github.com/narendravaghela/cakephp-mailgun/releases/tag/5.0.0 |
# |
Dec 18th 2019, 21:23 |
grzegorek.rafal |
*Thanks |
# |
Dec 18th 2019, 21:22 |
grzegorek.rafal |
Got it. Thank guys! :) |
# |
Dec 18th 2019, 21:22 |
grzegorek.rafal |
:+1: |
# |
Dec 18th 2019, 21:22 |
challgren |
And your schema would be `$schema->addField('name_id', 'boolean')` but I would recommend doing `$schema->addField('name_id', ['type' => 'boolean'])` |
# |
Dec 18th 2019, 21:22 |
grzegorek.rafal |
I see. |
# |
Dec 18th 2019, 21:21 |
challgren |
If you want the name_id to be hidden you would use `$this->Form->hidden('name_id')` instead of control |
# |
Dec 18th 2019, 21:19 |
grzegorek.rafal |
Of course |
# |
Dec 18th 2019, 21:19 |
challgren |
First are you extending Cake\Form\Form? |
# |
Dec 18th 2019, 21:18 |
challgren |
No |
# |
Dec 18th 2019, 21:17 |
grzegorek.rafal |
Right - so "name_id" would be "boolean" in _buildSchema() and then I should mark this controll as "hidden" in template? |
# |
Dec 18th 2019, 21:16 |
grzegorek.rafal |
:thinking_face: |
# |
Dec 18th 2019, 21:14 |
admad |
Raph: schema types != html type |
# |
Dec 18th 2019, 20:55 |
grzegorek.rafal |
Any ideas? |
# |
Dec 18th 2019, 20:55 |
grzegorek.rafal |
The problem is that 'name_id" control is being displayed as select, while it should be hidden. |
# |
Dec 18th 2019, 20:54 |
grzegorek.rafal |
```<?php echo $this->Form->create($form); echo $this->Form->control('name_id'); echo $this->Form->control('name2_id', ['options' => $featurePackagesList, 'empty' => '(choose one)']); echo $this->Form->button('Save'); echo $this->Form->end(); ?>``` |
# |
Dec 18th 2019, 20:54 |
grzegorek.rafal |
Then in template |
# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
```protected function _buildSchema(Schema $schema): Schema { //phpcs:enable return $schema ->addField('name_id', 'hidden') ->addField('name2_id', ['type' => 'select']); }``` |
# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
In form class I have |
# |
Dec 18th 2019, 20:53 |
grzegorek.rafal |
I'm having some issues with creating modelless form. |
# |
Dec 18th 2019, 20:52 |
grzegorek.rafal |
hello |
# |
Dec 18th 2019, 15:30 |
Naino |
Alright I understand, thanks a lot! |
# |
Dec 18th 2019, 15:29 |
neon1024 |
https://github.com/cakephp/cakephp/blob/3.8.7/src/I18n/RelativeTimeFormatter.php#L314-L350 |
# |
Dec 18th 2019, 15:28 |
neon1024 |
As it looks to me like the helper has translations you’ll have to translate |
# |
Dec 18th 2019, 15:27 |
neon1024 |
Did you try `new FrozenTime('2020-01-01', 'Europe/Paris')` or similar? |
# |
Dec 18th 2019, 15:22 |
Naino |
Uploaded file: https://uploads.kiwiirc.com/files/eec209403bcd5379c4f3413283cee589/Capture%20d%E2%80%99e%CC%81cran%202019-12-18%20a%CC%80%2016.21.59.png |
# |
Dec 18th 2019, 15:22 |
Naino |
Uploaded file: https://uploads.kiwiirc.com/files/40995561f0c2cf4d800e930f619a4e8e/Capture%20d%E2%80%99e%CC%81cran%202019-12-18%20a%CC%80%2016.21.43.png |
# |
Dec 18th 2019, 15:16 |
neon1024 |
Looks like they take a translation to me |