# |
May 19th 2017, 04:58 |
laahudra |
Hey! according to: If you need to pass additional data to your validation methods such as the current user’s id, you can use a custom dynamic provider from your controller. $this->Examples->validator('default')->provider('passed', [ 'count' => $countFromController, 'userid' => $this->Auth->user('id') ]); Then ensure that your validation method has the second context parameter. public function customValidationMethod($check, array |
# |
May 19th 2017, 04:32 |
djbuss |
can I still have a tableless model like using array source ? |
# |
May 19th 2017, 04:31 |
robertpustulka |
@igreat can you show your composer file? Also did you refresh autoloader? (`composer dumpa`) |
# |
May 19th 2017, 04:30 |
theJoeCool |
? |
# |
May 19th 2017, 04:30 |
theJoeCool |
Hi, how can i dentify an user using the AuthComponent but from Cookies, I'm able to get the information to generae the validation but at the moment of identify() the user i get false |
# |
May 19th 2017, 01:08 |
royalty |
thanks anyways gents have a good one |
# |
May 19th 2017, 01:08 |
royalty |
anyway I suppose i don't need that anymore |
# |
May 19th 2017, 00:43 |
royalty |
then unlink them? |
# |
May 19th 2017, 00:43 |
royalty |
is it possible to load associations on the fly |
# |
May 19th 2017, 00:36 |
royalty |
wew |
# |
May 19th 2017, 00:36 |
royalty |
by finding someone else who already figured it out |
# |
May 19th 2017, 00:36 |
royalty |
i figured out how to filter on join data http://stackoverflow.com/questions/31643906/cakephp-3-x-hasmany-through-association-find |
# |
May 19th 2017, 00:28 |
royalty |
if you have the behavior set |
# |
May 19th 2017, 00:28 |
royalty |
anyways created and modified should get autofilled |
# |
May 19th 2017, 00:27 |
royalty |
i don't think you understood me |
# |
May 19th 2017, 00:27 |
royalty |
huh |
# |
May 19th 2017, 00:27 |
FThoc |
as book says |
# |
May 19th 2017, 00:26 |
FThoc |
royalty, I create these files manually. |
# |
May 19th 2017, 00:25 |
Leonardo_0112 |
Well, I got it! it's a Router::connect '/baz/:action/*' that was causing it. Solved! |
# |
May 19th 2017, 00:21 |
Leonardo_0112 |
Hi! I've a question in this pastebin: https://pastebin.com/McdxavfK |
# |
May 19th 2017, 00:10 |
royalty |
let the ORM do it for you |
# |
May 19th 2017, 00:10 |
royalty |
there is no need to set/unset them for any reason |
# |
May 19th 2017, 00:10 |
royalty |
just make sure you aren't altering them |
# |
May 19th 2017, 00:10 |
FThoc |
touch? |
# |
May 19th 2017, 00:10 |
royalty |
are you doing anything to touch the values before save? |
# |
May 19th 2017, 00:10 |
royalty |
okay |
# |
May 19th 2017, 00:10 |
FThoc |
created and modified |
# |
May 19th 2017, 00:09 |
FThoc |
yep |
# |
May 19th 2017, 00:09 |
FThoc |
it was here from the beginning |
# |
May 19th 2017, 00:09 |
royalty |
do you have a created datetime field |
# |
May 19th 2017, 00:09 |
FThoc |
Yep, I add it but no effect |
# |
May 19th 2017, 00:09 |
royalty |
$this->addBehavior('Timestamp'); |
# |
May 19th 2017, 00:09 |
royalty |
the TimeStamp behavior |
# |
May 19th 2017, 00:09 |
royalty |
yeah you just need to add the behavior in initialize |
# |
May 19th 2017, 00:07 |
FThoc |
I add that behavior via myphpadmin, but that's not good |
# |
May 19th 2017, 00:06 |
FThoc |
new article entity should has timestamped fields, but it's not |
# |
May 19th 2017, 00:06 |
FThoc |
I got it |
# |
May 19th 2017, 00:06 |
FThoc |
a |
# |
May 19th 2017, 00:05 |
FThoc |
now format() always get NULL in "created" field |
# |
May 19th 2017, 00:04 |
royalty |
cool |
# |
May 19th 2017, 00:04 |
royalty |
ah okay so you fixed it I guess? |