Log message #4108750

# At Username Text
# Jan 13th, 13:11 admad so share session between the 2 apps and redirect to cake login page is not authticated
# Jan 13th, 13:10 dinosaur @admad I did. But it is a protected content, so I wish to auth into cake and only then allow access to that old files/structure...
# Jan 13th, 13:03 admad @dinosaur if you put the old site inside webroot it will be directly accessible like domain.com/oldfoo.php
# Jan 13th, 12:57 technofection Hi, I am trying to create a resource map like this 'map' => [ '/search/:page/:records/*' => [ 'action' => 'index', 'method' => 'GET' ], .... .... I want to set regular expression for the URL parameters... What is the syntax?
# Jan 13th, 12:52 dinosaur I have an old site using raw PHP with no MVC. For several reasons, I wish to put it "inside" a CakePHP. I've found this https://www.endpoint.com/blog/2009/12/03/iterative-migration-of-legacy (exactly what I want) but it is too old and I could not replicate the generic idea to CakePHP3. Does anyone maded similar thing? Can you point me to idea to try? Rebuild it from scratch is not an option.
# Jan 13th, 12:48 ghoritrilochan i have use https://github.com/paypal/PayPal-PHP-SDK this plugin but not understand which place in insert "first .php" file
# Jan 13th, 12:13 info356 ah great! thanks
# Jan 13th, 12:13 admad https://api.cakephp.org/3.5/class-Cake.Collection.CollectionInterface.html#_combine
# Jan 13th, 12:13 admad @info356 ->all()->combine()
# Jan 13th, 12:12 ghoritrilochan any have paypal payment getway demo. i not understand how to implement so...
# Jan 13th, 12:09 info356 toArray(['keyValue' => '{n}.reference']) would be a nice feature or not?
# Jan 13th, 12:07 admad instead of the foreach you can use Hash::combine()
# Jan 13th, 11:48 info356 File uploaded https://cakesf.slack.com/files/U8MUBMSFQ/F8RSXA341/-.php / https://slack-files.com/T053DPNCM-F8RSXA341-3929512773
# Jan 13th, 11:19 kitcat711 I am trying with a contain, but got an empty array as a result
# Jan 13th, 11:19 kitcat711 how can I get an article with all its tags?
# Jan 13th, 11:18 kitcat711 using the BelongsToMany association like here https://book.cakephp.org/3.0/en/orm/associations.html#belongstomany-associations
# Jan 13th, 11:18 kitcat711 hey there
# Jan 13th, 11:05 technofection Hi, I am trying to create a resource map like this 'map' => [ '/search/:page/:records/*' => [ 'action' => 'index', 'method' => 'GET' ], .... .... I want to set regular expression for the URL parameters... What is the syntax?
# Jan 13th, 01:44 mdotobie Actually scratch that question. I just realized there is another approach I can take
# Jan 13th, 01:34 mdotobie is there a way to access the ServerRequest object from a Form object in CakePHP 3.5
# Jan 12th, 23:15 obinoob *supposed
# Jan 12th, 23:14 obinoob admad thank you meanwhile I've used a for loop in my ajax call but tomorrow I'll read the api carefully I'm so blind by now! I'm not sure how it's suppose to change date format on a batch of records... suppose I need to use a for loop right?
# Jan 12th, 21:04 admad Err obinoob
# Jan 12th, 21:04 admad opinion: use this in bootstrap https://api.cakephp.org/3.5/class-Cake.I18n.DateFormatTrait.html#_setJsonEncodeFormat
# Jan 12th, 20:23 obinoob my javascript application is expecting a json value to be a date startDate: Sat Aug 25 2018 00:00:00 GMT+0100 (WEST) but cakephp is returning string startDate: "2018-01-12T19:55:58+00:00" is there a way I can do this from server side or I will have to loop data with javascript and make my things?
# Jan 12th, 18:54 maymeow anyone have good travis config file for cakephp (with mysql service) ?
# Jan 12th, 18:22 DJTrey i have a cakephp site that has wordpress in the webroot. it keeps redirecting to /webroot/blog. can someone please take a look if you have a chance? here's my htaccess https://stackoverflow.com/questions/48229945/wordpress-blog-inside-of-cakephp-keeps-redirecting-to-webroot-blog
# Jan 12th, 16:36 beakman Or some sorta join which would might end up a bit more efficient.
# Jan 12th, 16:35 beakman @bigdaddygee Might be able to shove a subquery somewhere in there too.
# Jan 12th, 16:35 bigdaddygee Maybe yes, but I just don't understand why this not working. but thanks :slightly_smiling_face:
# Jan 12th, 16:35 beakman https://book.cakephp.org/3.0/en/orm/behaviors/counter-cache.html
# Jan 12th, 16:34 beakman @bigdaddygee Might just want to use a counter cache for that.
# Jan 12th, 16:31 bigdaddygee ``` $Stores = $this->Stores ->find() ->select(['UserStores.Count' => function(\Cake\ORM\Query $q) { return $q->func()->count('*'); }]) ->contain([ 'CreatedByUsers', 'ModifiedByUsers', 'Users', 'UserStores', 'Images' ]); ```
# Jan 12th, 16:31 bigdaddygee Humm, do someone know how I can inject a count of another table into a resultset ? (Actualy I got the list instead of the count)
# Jan 12th, 16:19 neon1024 https://book.cakephp.org/3.0/en/orm/query-builder.html#automatically-creating-in-clauses
# Jan 12th, 16:18 danishkhan3621 is there any link of tutorials where i can get fetching result of these types.
# Jan 12th, 16:17 neon1024 Still, at least there is finally a `.forEach()`
# Jan 12th, 16:16 neon1024 Well, I suppose technically it’s a hash of objects as strictly speaking Javascript doesn’t have arrays
# Jan 12th, 16:16 danishkhan3621 @neon1024: Thanks
# Jan 12th, 16:15 neon1024 So you’ll have to fix that ;)
# Jan 12th, 16:15 neon1024 It’s an array of objects