Log message #4049110

# At Username Text
# Jul 6th 2017, 19:16 jeremyharris the most important things to understand when starting are PHP concepts, like how autoloading and namespaces work. that way, if you need to find something, you will at least know where to look (IDEs help with this as you can usually command+click and it will open the file::method for you)
# Jul 6th 2017, 19:16 jarard01 I then have: $foo = Chronos::create(strtotime($from));
# Jul 6th 2017, 19:16 jarard01 it is an I18n\Time object
# Jul 6th 2017, 19:15 jarard01 jeremyharris, my date format is as follows: 2017-07-01T00:00:00+00:00
# Jul 6th 2017, 19:15 spencdev Like they are saying, I wouldn't get too caught up in that. I've been using CakePHP for around a year and I still don't have everything figured out. Heck, I just learned that the ORM can be used as standalone, which to me is huge...
# Jul 6th 2017, 19:14 jarard01 *when
# Jul 6th 2017, 19:14 jarard01 from there are you want to add and expand your app you will learn more about cake
# Jul 6th 2017, 19:14 sturm Yeah, I’m already following Lynda’s tutorial on the subject (https://www.lynda.com/CakePHP-tutorials/CakePHP-3-Essential-Training/452749-2.html), which is helping somewhat. Maybe I’ll do CakePHP’s tutorial after that.
# Jul 6th 2017, 19:14 jarard01 sturm - don't bog yourself down with the core files, do the tutorial and then you'll see what Cake can do for you
# Jul 6th 2017, 19:13 jeremyharris I don’t think you need to understand that dispatching process yet :slightly_smiling_face:
# Jul 6th 2017, 19:13 sturm I mean, I’m already confused just following /index.php to /webroot/index.php. I stop there because I can’t figure out what that file is doing. I can’t even imaging delving deeper into what appears to be a rat’s nest of classes and method calls and such.
# Jul 6th 2017, 19:12 jeremyharris @sturm jarard01's suggestion to start with the tutorial is a good one. not only will it help you get familiar with cake itself, but it uses some basic OOP which is pretty easy to understand if you know a little OOP (e.g., extending AppController, extending core classes, etc.)
# Jul 6th 2017, 19:11 jarard01 let me try that
# Jul 6th 2017, 19:10 jeremyharris jarard01 what have you tried? usually it accepts any strtotime string
# Jul 6th 2017, 19:10 jeremyharris @sturm it might be a good exercise in learning, although yes it is quite large and can be daunting. For me, whenever I needed to understand how a feature worked under the hood, I would delve into that specific thing. Eventually, I touched most of the framework
# Jul 6th 2017, 19:10 jarard01 hi jeremyharris - any ideas how I can use chronos with a datetime field from my db
# Jul 6th 2017, 19:08 jeremyharris nice obinoob!
# Jul 6th 2017, 19:08 obinoob slackebot: jeremyharris thank you for your help the 'on' made it happen ;) https://gist.github.com/fccpt/839fc34c156ce0321c04c8045987665d
# Jul 6th 2017, 19:08 jarard01 sturm, start with the tutorial
# Jul 6th 2017, 19:07 sturm As a newbie to object-oriented PHP, should I even bother trying to untangle how CakePHP works? It look so complex. Maybe I don’t need to know all of its nuts and bolts?
# Jul 6th 2017, 18:55 jarard01 if I have a date in the format '1 Jul 2017' how can I create a chronos object
# Jul 6th 2017, 18:54 graziel ok got it, kind of
# Jul 6th 2017, 18:52 graziel `country_id` and `status` isnt included in INSERT
# Jul 6th 2017, 18:51 graziel https://gist.github.com/Graziel/3add00444c31185ac330dc51f7b01059
# Jul 6th 2017, 18:50 admad show the debug() of entity b4 it's passed to save()
# Jul 6th 2017, 18:47 graziel any idea why accessible and dirty field is not being included in INSERT query?
# Jul 6th 2017, 18:39 devito thanks
# Jul 6th 2017, 18:39 devito looks liek it did the trick
# Jul 6th 2017, 18:28 devito thanks
# Jul 6th 2017, 18:28 devito nice ill give ti a shot
# Jul 6th 2017, 18:26 jeremyharris then that would probably do it
# Jul 6th 2017, 18:26 devito yea
# Jul 6th 2017, 18:25 jeremyharris I’m assuming here you’d let it fail silently
# Jul 6th 2017, 18:25 jeremyharris the invalid login entity would fail to save if Users didn’t have username
# Jul 6th 2017, 18:23 jeremyharris you could do a very simple rule that just checks that it exists, e.g. $rules->add(function($entity) { return $this->Users->exists([‘username’ => $entity->username; ]) }, ‘usernameExists’);
# Jul 6th 2017, 18:23 devito making a invalid login table without calling the users table
# Jul 6th 2017, 18:22 devito I want to ensure a username exists in users table before i save the new record
# Jul 6th 2017, 18:21 jeremyharris what are you trying to do :P
# Jul 6th 2017, 18:21 jeremyharris waiiit nevermind ignore me
# Jul 6th 2017, 18:20 jeremyharris actually exists in uses arbitrary columns too
# Jul 6th 2017, 18:20 devito yea