Logs for #cakephp

Page 4 of 34,879, showing 100 records out of 3,487,833 total, starting on record 301, ending on 400

# At Username Text
# May 26th, 15:06 hmic the trick is only required if you want the highest bid from multiple users. if you only need the highest bid from one given user, thats way more straight forward
# May 26th, 15:06 styks1987 aren’t they essentially the same thing? Join is just clearer to me for this test
# May 26th, 15:05 styks1987 When I debug the query and run in sql pro it works, but the cake orm keeps returning all 3 bids instead of the highest one
# May 26th, 15:05 hmic i would have thought of leftJoinWith instead
# May 26th, 15:04 styks1987 http://paste.debian.net/943259/
# May 26th, 15:04 styks1987 hmic: Thank you for your help earlier, however, I believe I am having an issue getting this to work through the cake ORM.
# May 26th, 14:53 spriz any crud users have have a minute to test something with me? :slightly_smiling_face:
# May 26th, 14:32 jeremyharris pretty much
# May 26th, 14:32 rudy1976s thank you all
# May 26th, 14:32 rudy1976s @jeremyharris so I can almost do anything if the registry is available at that time
# May 26th, 14:31 jeremyharris @rudy1976s in the migration file you can load up the table registry and do finds and such if you need to
# May 26th, 14:30 rudy1976s I also need to make conditional work on my migrations: I need to add some columns only if they are not
# May 26th, 14:30 spriz @jeremyharris we tend to put that as raw sql in the migrations
# May 26th, 14:29 jeremyharris yeah it’s just annoying when you want to seed the database with some defaults (say I add a table via migrations and want default records in there). End up putting a bunch of extra stuff in the migrations
# May 26th, 14:29 rudy1976s AH ok,
# May 26th, 14:28 spriz https://en.wikipedia.org/wiki/Database_seeding
# May 26th, 14:28 spriz Aye, point is seeds aren't one-off things like migrations
# May 26th, 14:28 jeremyharris didn’t want to offend anyone
# May 26th, 14:28 jeremyharris I was gonna say “probably hand-rolled” :P
# May 26th, 14:27 jeremyharris I think phinx seeds run each time like migrations do… which is annoying. do laravel seeds run even if they’ve run before
# May 26th, 14:27 rudy1976s @sprix what is “seeds” ?
# May 26th, 14:27 spriz as with everything else, they roll their own implementation ,:(
# May 26th, 14:27 spriz unfortunately not
# May 26th, 14:27 spriz nope
# May 26th, 14:27 jeremyharris does laravel use phinx?
# May 26th, 14:26 spriz I have a laravel side-project where I do though :slightly_smiling_face:
# May 26th, 14:26 rudy1976s I ask this because I am used to create migrations under Yii2 and now I need to do the same with cake
# May 26th, 14:26 spriz we don't on my cake project @jeremyharris
# May 26th, 14:26 jeremyharris sprix do you use seeds yourself? I’ve got a question about them
# May 26th, 14:26 spriz @rudy1976s but you can just put raw SQL in the migrations and populate data by thta ;)
# May 26th, 14:26 spriz @rudy1976s - that sounds more like seeds :slightly_smiling_face:
# May 26th, 14:25 rudy1976s Hello , I am using migrations: is there a way to use migrations for populating data too ? or to do some other stuffs ?
# May 26th, 14:22 deco Thank you!
# May 26th, 14:22 jeremyharris cool, glad to help!
# May 26th, 14:22 jeremyharris so if you made those entities implement an interface that had a method, say getTotal that was implemented in each entity. Entity A’s getTotal might return it’s “total” property while entity B’s getTotal might return it’s “amount” property
# May 26th, 14:22 deco @jeremyharris Yeah, that's what I'm looking for. Thanks!
# May 26th, 14:22 spriz holy smokes - if there is no boilerplate function for a crud function even though it's enabled - it passes all auth :thinking_face:
# May 26th, 14:21 jeremyharris deco yes you could. What I’m mean by the shared interface is, if you use ->match(‘propertyName’) it would *require* propertyName to exist on both types of entities
# May 26th, 14:19 deco Or would I need to implement a shared interface for that?
# May 26th, 14:19 deco @jeremyharris Ok. Could I then ->match() the hole collection for a key and retrieve both type of entities?
# May 26th, 14:15 jeremyharris deco you could put them in a collection, but you’d just have to be aware of any differences when using collection methods (unless they have a shared interface you can rely on)
# May 26th, 14:11 deco Good day! I have two type of entities can I create a collection with these two types? Or would it be wiser to put each entity type in it's own collection? I'm aggregating different data sets to generate a dashboard.
# May 26th, 13:59 spriz if I remove the $this->loadComponent everything works - but as soon as I load Crud - there is no authentication or authorization
# May 26th, 13:56 spriz although $this->Auth shows the right things in it :thinking_face:
# May 26th, 13:56 spriz it doesn't get into the isAuthorized at all
# May 26th, 13:56 spriz anyone have a tip on why my Crud controllers skip my Auth ? :thinking_face:
# May 26th, 13:50 megan awesome :)
# May 26th, 13:50 popperz0r found it! :slightly_smiling_face:
# May 26th, 13:50 grymmjack @megan thanks. i'll check that out.
# May 26th, 13:49 Neon1024 Ahok, was just curious
# May 26th, 13:49 megan @neon1024 I will ask :slightly_smiling_face: (there may have been a slight sound issue on some of the vid's
# May 26th, 13:48 Neon1024 Ah well, no big deal
# May 26th, 13:47 Neon1024 I can see Jorge and Jose
# May 26th, 13:47 Neon1024 Becuase I can’t see my face ;)
# May 26th, 13:47 Neon1024 ORLY
# May 26th, 13:47 dakota neon1024 I think they already have
# May 26th, 13:47 popperz0r i searched for beforeFind but i didnt understood it
# May 26th, 13:47 popperz0r Hey, how can i filter all results that are deleted = 1 from database?
# May 26th, 13:47 Neon1024 Will last years videos be released?
# May 26th, 13:46 megan https://cakefest.org/tickets The workshop is 8th/9th and its going to be streamed live (you can find the tickets there) (Once you get your ticket, you will get an email with the details to connect to the stream) - what is cool this year, is that they are going to take questions (which you will be able to send us over slack if you are streaming) and then they will answer those on the second day of the workshop
# May 26th, 13:44 grymmjack @megan that sounds promising! where is that?
# May 26th, 13:44 megan grymmjack - you should join the workshop stream :slightly_smiling_face: its like attending, without having to leave home
# May 26th, 13:36 grymmjack @dakota thank you. i don't go to confs :(
# May 26th, 13:33 styks1987 got it, thanks
# May 26th, 13:32 hmic and you want that biggest big of every person of course. which is exactly what that does
# May 26th, 13:32 hmic once you've grasped the idea, its easy to use the pattern
# May 26th, 13:31 styks1987 yep
# May 26th, 13:31 hmic s/as/has/
# May 26th, 13:31 hmic so you are looking for the bid of that person that as no other bid (from that person) that is greater
# May 26th, 13:30 styks1987 I just want the max by that person
# May 26th, 13:30 styks1987 but 3 made by one person
# May 26th, 13:30 styks1987 there may be 6 bids
# May 26th, 13:30 styks1987 hmic: I assume this would work with other conditions on it like no other one greater (of a specific user id)
# May 26th, 13:29 hmic left join, greater than condition, where is null. so you are looking for the one that has *no* other one greater than on the relation in the table
# May 26th, 13:27 styks1987 hmic solid thanks
# May 26th, 13:27 hmic this: https://www.exchangecore.com/blog/mysql-sql-retrieve-most-recent-or-largest-record-group/
# May 26th, 13:27 styks1987 So start with the bids and go the other direction?
# May 26th, 13:26 hmic this is a standard sql problem with a standard solution to it.
# May 26th, 13:26 hmic styks1987, wrong approach
# May 26th, 13:26 styks1987 I am trying to find listings a user has bid on and return their highest bid. So I am using matching to get the listings the user has bid on but this produces multiple listings with the same id. So I group them. The problem that i am having is that the group does not order the bids by date so it returns the first bid instead of the highest bid
# May 26th, 13:17 dakota http://cakefest.org/
# May 26th, 13:17 dakota @grymmjack If you aren’t already, you should also come to CakeFest :) Not only will you learn loads about CakePHP, but you might even be able to find somebody who’s looking for CakePHP work!
# May 26th, 13:15 dakota @grymmjack You can also use: http://cakephpjobs.com/
# May 26th, 13:04 rchavik using Crud, in my add() action, something went wrong. how do i find out what it is? right now no logs, only shows Flash message: 'could not create link'
# May 26th, 12:55 obinoob Thank you so much for your input
# May 26th, 12:54 obinoob hmic: if you have any example on how to do such Class let me know
# May 26th, 12:53 obinoob *want
# May 26th, 12:53 obinoob anyway, user must pass rules before can add a new document but I wont to put all that logic away from controller as it will increase code complexity etc
# May 26th, 12:51 obinoob that's why I've wrote a UserData class
# May 26th, 12:50 obinoob hmic: I need to check if user has active certificate, credits etc in order to let him add a new document, I've to check database in order to acknowledge user authorization, I've found https://book.cakephp.org/3.0/en/controllers/components/authentication.html#authorization very poor in examples
# May 26th, 12:50 grymmjack our cakephp site: http://www.carbontv.com
# May 26th, 12:50 grymmjack hello guys - we're looking to hire a cakephp deverloper full time - any additional experience like wordpress is great too - but mainly asking in here since it seems the most direct route to find someone :slightly_smiling_face: would any of you be interested? if so, please msg me :slightly_smiling_face: thanks!
# May 26th, 12:35 eax Excellent - Thanks! :)
# May 26th, 12:35 hmic eax: of course
# May 26th, 12:35 hmic obinoob, thats exactly it. just roll your own authorization class, if its more custom
# May 26th, 12:34 eax hmic: I'm unsure if this test is enough: https://gist.github.com/eaxexe/775ab0043c6822065ba56645f0cfb64d (Which fails) - I have made a repo on github that reproduces the error, and added this test to ArticlesTableTest.php - Is it acceptable to make the issue and refer to that repo, as for showing how to reproduce it? :)
# May 26th, 12:34 inoas so there was something built-in already :)
# May 26th, 12:34 inoas ->add('output_content_type', 'equalTo', ['rule' => ['equalTo', 'INHERIT'], 'on' => function ($context) { return $context['data']['kind'] !== 'DOCUMENT'; }]); - works like a charm
# May 26th, 12:33 obinoob hmic well I first though of ACL but not sure... I've also read https://github.com/burzum/cakephp-simple-rbac it's not definitely what I need I could easily achieve that with authorise method
# May 26th, 12:31 hmic you can easily roll a completely custom authorization class too of course. if thats what you like to do...