# |
Sep 12th 2019, 11:08 |
fhxfhx |
... also, do plugins have their own db config ? |
# |
Sep 12th 2019, 11:08 |
fhxfhx |
in cake3.5, where do i see which is my connected db ? |
# |
Sep 12th 2019, 09:55 |
jotpe |
ok, thank you :slightly_smiling_face: |
# |
Sep 12th 2019, 09:55 |
spriz |
I use way more components that cells generally fwiw ÆD |
# |
Sep 12th 2019, 09:55 |
admad |
fhxfhx: if you don't see composer.json is a cake 2 app (or cake 1), in that case check for lib/Cake/VERSION.txt |
# |
Sep 12th 2019, 09:55 |
spriz |
if you also have a view file with some if or whatever, then I'd put it in a cell |
# |
Sep 12th 2019, 09:54 |
spriz |
I tend to put stuff in components if it is controller-logic only |
# |
Sep 12th 2019, 09:54 |
fhxfhx |
k tx |
# |
Sep 12th 2019, 09:54 |
spriz |
fhxfhx composer.json or composer.lock would be a great place to start if it is with composer ÆD |
# |
Sep 12th 2019, 09:54 |
jotpe |
So component or cell? |
# |
Sep 12th 2019, 09:53 |
jotpe |
And I have a backend/frontend which use the same AppController, but the navigation is only for the fe |
# |
Sep 12th 2019, 09:53 |
fhxfhx |
hi, I'm picking up on a project I had started with someone who's not available any more. I wanted to find out which cake version was used on the app, and under which path the cakePhp-framework files are located |
# |
Sep 12th 2019, 09:53 |
admad |
then write a component :slightly_smiling_face: |
# |
Sep 12th 2019, 09:52 |
jotpe |
I want to keep my AppController as clean as possible |
# |
Sep 12th 2019, 09:52 |
spriz |
if it has controller-ish logic, a view cell sounds like a good place though Æ= |
# |
Sep 12th 2019, 09:51 |
spriz |
and use the variable in an element/layout |
# |
Sep 12th 2019, 09:51 |
spriz |
Or you can set this in the AppController in beforeFilter or beforeRender |
# |
Sep 12th 2019, 09:50 |
jotpe |
? |
# |
Sep 12th 2019, 09:50 |
jotpe |
I have a navigation in my layout which is based on data set by a controller. I want to use this navigation on every page in my frontend, but I don't want to set the variable in every controller. Is a view cell a good place to implement this |
# |
Sep 12th 2019, 09:30 |
ndm |
And use a persistent SMTP connection. |
# |
Sep 12th 2019, 09:29 |
admad |
adjust your batch size depending on smtp server limits, but yeah using a dedicated service might be better as it would handle the throttling |
# |
Sep 12th 2019, 09:22 |
davorminchorov |
It looks like I should use a relay email |
# |
Sep 12th 2019, 09:17 |
davorminchorov |
I am not sure if the SMTP timeout limitations is specific to gmail smtp or it's a general spam prevention mechanism for all email sending providers, so I don't want to make it look like it's a spam system |
# |
Sep 12th 2019, 09:15 |
davorminchorov |
The use case is the following, I have an excel file with data and I want to mass upload a bunch of users (max 500), and after the creation, I want to send email to that user to let him know that his account was created |
# |
Sep 12th 2019, 09:13 |
davorminchorov |
yeah I am using a queue but it seems like after 100 emails sent as a loop, there's an SMTP timeout |
# |
Sep 12th 2019, 09:12 |
admad |
a queue and cronjob? |
# |
Sep 12th 2019, 09:10 |
davorminchorov |
Hi, how do you send a ton of emails without SMTP timeout? Do you delay them? Send one email with multiple addresses? Any ideas? |
# |
Sep 12th 2019, 09:01 |
jotpe |
@narendravaghela ok, thank you :slightly_smiling_face: |
# |
Sep 12th 2019, 08:59 |
javier.villanueva |
ok, i solved with hash::extract |
# |
Sep 12th 2019, 08:41 |
javier.villanueva |
In a belongsToMany association (f.ex. articles/tags) can I get the article and their tags (but only a list of ids)? |
# |
Sep 12th 2019, 08:29 |
narendravaghela |
Try not to expose internal IDs if it is a public content. Slug is sufficient for find. |
# |
Sep 12th 2019, 08:20 |
jotpe |
Using the ID and Slug for the find in the controller |
# |
Sep 12th 2019, 08:20 |
jotpe |
What's best practice for a blog/news system with urls and slugs? The Quickstart finds articles by Slugs: https://book.cakephp.org/3.0/en/quickstart.html#create-the-view-action, which is good from a seo perspective. Is that sufficient or is it better to add a id to the url? F.e.: |
# |
Sep 12th 2019, 07:32 |
conehead |
Mornin |
# |
Sep 12th 2019, 07:32 |
jotpe |
Morning |
# |
Sep 12th 2019, 07:07 |
spriz |
@admad I guess it's returning https://www.tomasvotruba.cz/blog/2017/09/04/how-apigen-survived-its-own-death/ ;P |
# |
Sep 12th 2019, 05:50 |
kgb.acct.personal |
Thanks. I'll take a look at it :+1: |
# |
Sep 12th 2019, 05:44 |
admad |
though the apigen project is now defunct and doesn't support newer php versions |
# |
Sep 12th 2019, 05:44 |
admad |
you sure can |
# |
Sep 12th 2019, 05:41 |
kgb.acct.personal |
Can I use it to generate API docs for my project? |
# |
Sep 12th 2019, 05:36 |
admad |
@kgb.acct.personal https://github.com/cakephp/cakephp-api-docs |