Log message #4149300

# At Username Text
# Jun 10th 2018, 09:11 tylergel Nothing, I do if($this->request->is($_POST) { debug($this->request->data); } And when I submit the form I get "[]"
# Jun 10th 2018, 09:05 lorenzo what’s in $_POST?
# Jun 10th 2018, 09:04 tylergel What could be causing $this->request->data to always be empty after submitting form in cakephp 3?
# Jun 10th 2018, 08:53 lorenzo loading them on each function is not too bad
# Jun 10th 2018, 08:53 lorenzo what are you trying to do?
# Jun 10th 2018, 08:37 birdy247 I tried using a constructor, but it didnt like this
# Jun 10th 2018, 08:37 birdy247 or should i just load them in each function?
# Jun 10th 2018, 08:37 birdy247 @lorenzo is there a "best approach" to loading models in a listener
# Jun 10th 2018, 08:29 graziel ok will do
# Jun 10th 2018, 08:26 lorenzo just go with anything :slightly_smiling_face:
# Jun 10th 2018, 08:10 graziel lets say i would like to create some cake tutorial, does cake have some preferred blog site that it wants to focus on or just go with anything?
# Jun 10th 2018, 08:01 gannher thanks :)
# Jun 10th 2018, 08:00 birdy247 @lorenzo thanks
# Jun 10th 2018, 07:55 lorenzo yes @birdy247
# Jun 10th 2018, 07:55 lorenzo gannher, validation occres when you use newEntity() or parthEntity() not when calling save()
# Jun 10th 2018, 07:55 birdy247 Is that calling that under the hood?
# Jun 10th 2018, 07:54 birdy247 Ah ok
# Jun 10th 2018, 07:54 lorenzo you can then use $this->loadModel()
# Jun 10th 2018, 07:54 lorenzo @birdy247 add the `ModelTrait` to your class
# Jun 10th 2018, 07:52 birdy247 As TableRegistery::get() is depricated, is there a mice way of writing (new TableLocator())->get()
# Jun 10th 2018, 07:14 gannher When i try to validate data by using "$this->Users->save($user))" no error is print, but there is error when i use "$validator->errors($this->request->getData())" in Controller
# Jun 10th 2018, 07:12 gannher validationDefault in model is functionnal in cakephp 3.6 ?
# Jun 10th 2018, 07:09 gannher hello
# Jun 9th 2018, 23:29 josexato nice, thanks
# Jun 9th 2018, 21:25 lorenzo the second argument array will be available in the cusotm finder
# Jun 9th 2018, 21:24 lorenzo `$table->find('customThing', ['extraOption' => $value])`
# Jun 9th 2018, 21:24 lorenzo yeah, in the second argument of find
# Jun 9th 2018, 21:18 josexato @lorenzo thanks, I think that's the approach I'll aim. nevertheless I was wondering if there was a way to pass an argument to a custom finder
# Jun 9th 2018, 21:13 lorenzo you can then do `$submenuTable->find()->contain(‘ChoseDish’, function ($q) { return $q->where([‘available_dish_id’ => ...]); });
# Jun 9th 2018, 21:12 lorenzo thta association looks like a `Submenu belongsToMany ChosenDish`
# Jun 9th 2018, 20:59 josexato i was planing to use a custom finder that receives the ID of the intermediate table `available_dish_id` but I dont know if its possible to pass an argument to the custom finder used in the association "Submenu hasOne ChosenDish"
# Jun 9th 2018, 20:56 josexato I need to implement an association "Submenu hasOne ChosenDish"
# Jun 9th 2018, 20:50 lorenzo @josexato I got lost, what’s your actual requirement?
# Jun 9th 2018, 20:27 josexato File uploaded https://cakesf.slack.com/files/U1QRH4E82/FB4LFTS5R/imagen.png / https://slack-files.com/T053DPNCM-FB4LFTS5R-ed1975b3d0
# Jun 9th 2018, 20:26 josexato I need to load the Submenu->ChosenDish() based in the AvailableDish_id I receive
# Jun 9th 2018, 20:25 josexato my real case is a bit more complicated because it uses an intermediate table SubMenu BelongsToMany Dishes and I am using an intermediate table AvailableDishes
# Jun 9th 2018, 20:20 josexato just as an example
# Jun 9th 2018, 20:20 josexato I would like something like Courses->StudentsWithGradeHigherThan('90')
# Jun 9th 2018, 20:18 josexato for example I have an association Courses has many Students
# Jun 9th 2018, 20:17 lorenzo how are you calling the custom finder in the association?
# Jun 9th 2018, 20:14 josexato in the table class i define the custom finder and the association that will use that finder