Log message #4267679

# At Username Text
# Jul 16th 2021, 09:34 paolo.bragagni debug is set to true
# Jul 16th 2021, 09:33 paolo.bragagni plugin DebugKit is there
# Jul 16th 2021, 09:33 paolo.bragagni yes
# Jul 16th 2021, 09:31 kevin.pfeifer you mean debug mode in cakephp with the debug toolbar at the bottom?
# Jul 16th 2021, 09:29 paolo.bragagni I've change something in the past and is not there no more
# Jul 16th 2021, 09:29 paolo.bragagni how to enable debug?
# Jul 16th 2021, 09:28 martin Yes I like that use () is possible, I know that it was a nightmare in the past to global variables so you can use it everywhere :)
# Jul 16th 2021, 09:28 paolo.bragagni another stupid question
# Jul 16th 2021, 08:34 paolo.bragagni :) thanks
# Jul 16th 2021, 08:33 paolo.bragagni it was enough to know that
# Jul 16th 2021, 08:33 paolo.bragagni wow
# Jul 16th 2021, 08:32 joelmontefer13 $query = $this->Categorie                     ->find('search', ['search' => $this->request->getQueryParams()])                     ->notMatching($return['returnmodel'], function ($q) use ($return) {                     return $q->where([$return['returnmodel'] . '.id' => $return['returncontrollerid']]);                     });
# Jul 16th 2021, 08:31 paolo.bragagni Imean, I'd like to pass a parameter inside the function
# Jul 16th 2021, 08:29 paolo.bragagni $query = $this->Categorie ->find('search', ['search' => $this->request->getQueryParams()]) ->notMatching($return['returnmodel'], function ($q) { return $q->where([$return['returnmodel'] . '.id' => $return['returncontrollerid']]); });
# Jul 16th 2021, 08:29 paolo.bragagni how to do this?
# Jul 16th 2021, 08:29 paolo.bragagni morning
# Jul 15th 2021, 22:45 jh ```$articles->Comments->getTable()```
# Jul 15th 2021, 22:44 jh https://api.cakephp.org/4.2/class-Cake.ORM.Table.html#getTable()
# Jul 15th 2021, 22:42 jh https://book.cakephp.org/4/en/orm/table-objects.html
# Jul 15th 2021, 22:42 jh https://book.cakephp.org/3/en/orm/table-objects.html
# Jul 15th 2021, 22:42 jh or ->getTable()
# Jul 15th 2021, 22:41 jh `$posts->comments->getTableName()` or simiar
# Jul 15th 2021, 22:41 jh $tableClass->{'AssociationName')->getTableName() or similar
# Jul 15th 2021, 22:39 jh oh just the table name
# Jul 15th 2021, 22:38 jh get a table class instance
# Jul 15th 2021, 22:38 jh setup has-many/belongs to
# Jul 15th 2021, 15:31 sibusiso Resolving by doing the following: ```public function getForeignTable($column) { if ('_id' === substr($column, -3)){ $column = substr($column, 0, -3); } return Inflector::classify($column); }```
# Jul 15th 2021, 15:05 cnizzardini np, for really basic stuff I just have a shell script that i run which does all that plus runs migrations and whatever else i need. For more elaborate stuff i use github actions (or jenkins if i have to). but you don't need to worry about elaborate stuff for now.
# Jul 15th 2021, 14:56 davidmckenzie2015 Yes, I agree thanks - webapp dev is a side gig - so I have some learning and refresh to do on git - thanks for the help.
# Jul 15th 2021, 14:49 cnizzardini `git pull andand composer install --no-dev` and possibly some bin/cake cache clear commands added on is enough to deploy small/basic apps
# Jul 15th 2021, 14:47 cnizzardini you should just learn git
# Jul 15th 2021, 14:20 davidmckenzie2015 Thanks, I'll check out using rync.
# Jul 15th 2021, 14:14 admad You can also use rsync to upload files to server which would be blazing fast compared to FTP
# Jul 15th 2021, 13:57 davidmckenzie2015 Ya, disk space was a primary concern. Sounds like it will be better to have each webapp have its one set of cakephp files. Looks like I need to find some tutorials on how to use git hub and/or composer to manage the files on the server w/o having to transfer using an FTP client - that takes forever. Thanks for the help and tips.
# Jul 15th 2021, 13:56 sibusiso Hi everyone, Quick question: given a column name like "product_id," is there a simple built-in function that will return "Products" as a foreign table? Thanks you
# Jul 15th 2021, 13:43 cnizzardini There is probably some hacky way to do it with symbolic links, but I sense it being a lot of pain for little (any?) gain. What if you need to run cakephp 4.2 for one app and 4.3 for another? What about other dependency issues? Not worth.
# Jul 15th 2021, 11:34 hmic the simple answer is: you dont.
# Jul 15th 2021, 11:32 martin ``` $this->belongsToMany('Products', [ 'foreignKey' => 'store_id', 'targetForeignKey' => 'product_id', 'through' => 'StoresProducts', 'finder' => 'active', ]);``` like this does not work so I think I also need to create that active filter in Products table, but how do I filter there on the end_date in stores_products
# Jul 15th 2021, 11:27 martin I’ve a in table `Stores` a BelongsToMany relation ship with `Products`, I did add through to the relation ship, now in the through table there is an end date, so I just want to contain `Products` to the `Store` which are not expired. I already created a finder active in the `StoresProducts` table. but I think I can not use that one with the BelongsToMany?
# Jul 15th 2021, 11:13 g.garin20191123 Hi everyone! I am from originally Vietnam currently live in Krasnodar, Russia. I am a full stack developer. I can work full time remotely in any time zone. I am looking for full time remote job. Please send me a message if you are looking for a good experienced developer. Thank you, Gavril.
# Jul 15th 2021, 09:58 dereuromark right right