# |
Oct 18th 2019, 13:01 |
felipe.marinho |
I tried to create this in the CompaniesTable.php: ```->add('codcompany', 'Search.Like', ['field' => ['exceptions.codcompany']]);;``` But it didn't work :( |
# |
Oct 18th 2019, 13:00 |
slackebot1 |
$this->request->query]); $companies = $this->paginate($query, array('limit'=>20));``` I wanna create a filter for the codcompanie in the Exception table. |
# |
Oct 18th 2019, 13:00 |
felipe.marinho |
Guys, I have an entity Company and another related called Exceptions. I'm on the Exceptions controller, but I'm listing the Company and all the Exceptions contained... the Search plugin (from FriendsOfCake) get the search behavior from the Company table but I'm trying to filter fields from the Exceptions. How can I do that? My 2 lines of code is: ```$query = $this->Exceptions->Companies->find('search', ['search' => |
# |
Oct 18th 2019, 12:35 |
scuadra |
Hello. I am not sure how to explain my question but I'll try. In Cake 3.x I have a plugin named Stuff. Is it possible to configure Auth to set Auth::user() only for the Stuff plugin when there is a user logged in? Right now if I am logged in in the Stuff plugin and visit the client side of the application, it still shows the user. |
# |
Oct 18th 2019, 12:31 |
ron.rattie |
If I have a table named activity_log_requests and the model is named AuditTrailRequests but I use $this->setTable('activity_log_requests'); it should work correct? |
# |
Oct 18th 2019, 11:31 |
javier.villanueva |
ok thanks @admad, in this case it is only for one use |
# |
Oct 18th 2019, 11:18 |
admad |
@javier.villanueva for one of case use formatResults(), if you need it always just specify `propertyName` in association config |
# |
Oct 18th 2019, 10:16 |
dereuromark |
formatResults sure sounds like a good way to go |
# |
Oct 18th 2019, 10:12 |
javier.villanueva |
>formatResults is the best way? |
# |
Oct 18th 2019, 10:11 |
javier.villanueva |
Its possible to map variable in a find? for instance. $this->Users->find('all')->contain('Articles'); returns ['User']['articles'][] , but I want ['User']['docs'][] , Any way to map "articles" by "docs" in the find? |
# |
Oct 18th 2019, 09:44 |
alexdd55976 |
long time ago... too long for my little brain :) |
# |
Oct 18th 2019, 09:44 |
dereuromark |
it was, but since they all inherit normal Table class, I dont see any issues. |
# |
Oct 18th 2019, 09:42 |
alexdd55976 |
singular was convention in 2.x? i could not remember it ever was singular? |
# |
Oct 18th 2019, 09:41 |
dereuromark |
why dont you try it and see for yourself? :slightly_smiling_face: |
# |
Oct 18th 2019, 09:41 |
dereuromark |
i still dont follow |
# |
Oct 18th 2019, 09:28 |
val |
For compatibility with 2.x code. Something like `TableRegistry::getTableLocator()->get('Post', ['className' => PostsTable::class]);` |
# |
Oct 18th 2019, 09:25 |
dereuromark |
what do you mean? singular model aliases? for what? |
# |
Oct 18th 2019, 09:24 |
val |
@dereuromark use singular model aliases like in 2.x. How would that work this that? |
# |
Oct 18th 2019, 09:03 |
challgren |
Doh missed that! |
# |
Oct 18th 2019, 09:03 |
javier.villanueva |
yes thanks ;) |
# |
Oct 18th 2019, 09:03 |
challgren |
Ahh ok, wasnt sure if you resolved it |
# |
Oct 18th 2019, 09:02 |
javier.villanueva |
@challgren nop, the problem was that my namespace was wrong in the task file |
# |
Oct 18th 2019, 09:01 |
challgren |
@javier.villanueva did you by chance modify your queue task after your started the process? The file is generally cached in memory |
# |
Oct 18th 2019, 08:55 |
neon1024 |
Hey @jotpe |
# |
Oct 18th 2019, 08:52 |
jotpe |
Hey :slightly_smiling_face: |
# |
Oct 18th 2019, 08:47 |
dereuromark |
bancer: I added a screenshot: https://github.com/dereuromark/cakephp-ide-helper/blob/master/docs/Generator.md#tablefinders magic strings are usually bad, but if you have typehinting/autocomplete on them, it becomes OKish :slightly_smiling_face: |
# |
Oct 18th 2019, 08:42 |
neon1024 |
Anyway, it’s more about if the code works right? ;) |
# |
Oct 18th 2019, 08:40 |
admad |
nothing can beat ST3 in terms of responsive since it's native |
# |
Oct 18th 2019, 08:40 |
neon1024 |
On the front-end thing, PHP Storm’s Vue plugin does work well :slightly_smiling_face: |
# |
Oct 18th 2019, 08:40 |
admad |
if one doesn't need all the bells and whistles that phpstorm provides then vscode with phpintelephense plugin is also decent enough. Plus for frontend dev vscode is probably the best these days |
# |
Oct 18th 2019, 08:39 |
neon1024 |
Glad it’s been improved :slightly_smiling_face: |
# |
Oct 18th 2019, 08:36 |
val |
The only problem with Eclipse is that is uses a lot of RAM. But I can live with that. |
# |
Oct 18th 2019, 08:36 |
dereuromark |
I also dont think other ides have a so powerful meta file feature than phpstorm does. |
# |
Oct 18th 2019, 08:32 |
conehead |
Wee but not I can try to use Vue with cake. Really wonder how this will work out |
# |
Oct 18th 2019, 08:31 |
conehead |
I tried so many. PhpStorm is just the best by far. Will never go back |
# |
Oct 18th 2019, 08:31 |
val |
Scrolling and auto-complete is very fast in my Eclipse. |
# |
Oct 18th 2019, 08:30 |
neon1024 |
Then I went to Sublime Text 3, with all the plugins, and then work bought me PHP Storm :) |
# |
Oct 18th 2019, 08:29 |
neon1024 |
Then I went to Netbeans, and that was even slower |
# |
Oct 18th 2019, 08:29 |
neon1024 |
Auto-complete |
# |
Oct 18th 2019, 08:29 |
neon1024 |
Scrolling |
# |
Oct 18th 2019, 08:28 |
val |
@neon1024 The speed of Eclipse is good enough for development. I notice no slowness. What operations were slow for you? |