# |
Aug 19th 2019, 11:55 |
ricksaccous |
one action/one route is fine |
# |
Aug 19th 2019, 11:55 |
ricksaccous |
that's what i would do, just edit the query, etc, based on params |
# |
Aug 19th 2019, 11:54 |
k4t |
maybe I should declare only one action and one route to that action with wildcard for params? |
# |
Aug 19th 2019, 11:53 |
k4t |
https://gist.github.com/K4T/3d88fbb23733ad935f60e46d77aa004c how would you simply such duplicated actions code? |
# |
Aug 19th 2019, 11:53 |
k4t |
may I ask you for an advice? |
# |
Aug 19th 2019, 11:53 |
k4t |
Hi all |
# |
Aug 19th 2019, 11:38 |
admad |
but iirc the trait still uses/needs the component |
# |
Aug 19th 2019, 11:37 |
admad |
yes |
# |
Aug 19th 2019, 11:30 |
neon1024 |
How is it that I’ve unloaded the CrudComponent but it still works? Is that the trait doing that? |
# |
Aug 19th 2019, 11:12 |
admad |
@conehead hasOne would generate joins so it would be essentially same and manual joins |
# |
Aug 19th 2019, 11:11 |
admad |
Hehe |
# |
Aug 19th 2019, 11:11 |
neon1024 |
Haha, well for all we know you might be called Mark @admad |
# |
Aug 19th 2019, 11:10 |
slackebot |
Action: admad ehm |
# |
Aug 19th 2019, 11:07 |
neon1024 |
It’s like the lead developers made up the rule :P |
# |
Aug 19th 2019, 11:06 |
neon1024 |
As you can’t get onto the Cake core team unless you’re named Mark or José |
# |
Aug 19th 2019, 11:06 |
neon1024 |
Well, one of the José’s |
# |
Aug 19th 2019, 11:06 |
neon1024 |
The only person who might be able to actually answer would be José |
# |
Aug 19th 2019, 11:04 |
conehead |
I will give it a shot tomorrow...and will let you know ;) |
# |
Aug 19th 2019, 11:04 |
neon1024 |
Such as the indexes we touched on a moment ago |
# |
Aug 19th 2019, 11:04 |
neon1024 |
If you’re getting into these kinds of optimisations, then they are incredibly environment specific |
# |
Aug 19th 2019, 11:03 |
neon1024 |
@conehead Because every application and environment is different |
# |
Aug 19th 2019, 11:03 |
neon1024 |
Sorry, I just found it `$this->modelClass = false;` |
# |
Aug 19th 2019, 11:02 |
conehead |
Just wanted to double check ;) Asking someone is simple as well...if someone knows, why test it in the first line :P |
# |
Aug 19th 2019, 11:02 |
neon1024 |
Can I disable the autoloading of a controllers matching table class? |
# |
Aug 19th 2019, 11:01 |
neon1024 |
That is the perfect face for CakeBot :,) |
# |
Aug 19th 2019, 11:01 |
slackebot |
!tias |
# |
Aug 19th 2019, 11:01 |
slackebot |
Command sent from Slack by neon1024: |
# |
Aug 19th 2019, 11:01 |
neon1024 |
Why not write the query and benchmark it against the ORM |
# |
Aug 19th 2019, 11:01 |
neon1024 |
I’d set fire to the place and find something new |
# |
Aug 19th 2019, 11:00 |
conehead |
As some Id's are UUIDs and some are ints |
# |
Aug 19th 2019, 11:00 |
conehead |
No, and I cannot :( |
# |
Aug 19th 2019, 10:59 |
neon1024 |
Do you have the correct indexes setup in your database? |
# |
Aug 19th 2019, 10:45 |
conehead |
Is using joins/explicit sql commands notably faster than using `contains`? Got rougly 2000 entries and each entry has 2 `hasOne` associations. I need all associations at the same time, so pagination is not an option. Was just wondering if I could speed it up |
# |
Aug 19th 2019, 10:35 |
dereuromark |
Thats documented: https://book.cakephp.org/3.0/en/development/routing.html#matching-specific-http-methods |
# |
Aug 19th 2019, 10:34 |
neon1024 |
Wow, when you create a route with a `->setMethod` you have to delcare the `_method` key in your Html links! |
# |
Aug 19th 2019, 09:37 |
dereuromark |
Thad said: Feel free to use, share and contribute. |
# |
Aug 19th 2019, 09:36 |
dereuromark |
For core adoption usually more than 70% would need to find them useful enough :slightly_smiling_face: Which is not often the case here, especially around opinionated topics. |
# |
Aug 19th 2019, 09:36 |
dereuromark |
yeah, those are opt-in fully, as such no one is required to have them. Thus a plugin. |
# |
Aug 19th 2019, 09:33 |
spriz |
this is another neat one I've stumbled upon https://github.com/dereuromark/executionorder |
# |
Aug 19th 2019, 09:32 |
spriz |
Just nice that we have access to them, but we should some kind of "New plugin on the awesome-cakephp" list announcements :) |
# |
Aug 19th 2019, 09:31 |
spriz |
I guess those changed are quite opinionated :) Nice way to have a "safe heaven"/playground |